]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Convert to `struct zebra_vxlan_sg` as per our internal standard
authorDonald Sharp <sharpd@nvidia.com>
Fri, 20 Aug 2021 12:53:44 +0000 (08:53 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 2 Sep 2021 14:33:22 +0000 (10:33 -0400)
We do not use typedef's to talk about structures as per our standard.
Fixing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/zebra_vxlan.c
zebra/zebra_vxlan_private.h

index 9eb1ebb44008327f1686f89170f8702e27504507..a96fd0f7e584be2cc64bca599cb636b44c8ca05f 100644 (file)
@@ -112,8 +112,9 @@ static unsigned int zebra_vxlan_sg_hash_key_make(const void *p);
 static bool zebra_vxlan_sg_hash_eq(const void *p1, const void *p2);
 static void zebra_vxlan_sg_do_deref(struct zebra_vrf *zvrf,
                struct in_addr sip, struct in_addr mcast_grp);
-static zebra_vxlan_sg_t *zebra_vxlan_sg_do_ref(struct zebra_vrf *vrf,
-                               struct in_addr sip, struct in_addr mcast_grp);
+static struct zebra_vxlan_sg *zebra_vxlan_sg_do_ref(struct zebra_vrf *vrf,
+                                                   struct in_addr sip,
+                                                   struct in_addr mcast_grp);
 static void zebra_vxlan_sg_deref(struct in_addr local_vtep_ip,
                                struct in_addr mcast_grp);
 static void zebra_vxlan_sg_ref(struct in_addr local_vtep_ip,
@@ -5962,7 +5963,7 @@ static int zebra_vxlan_sg_send(struct zebra_vrf *zvrf,
 
 static unsigned int zebra_vxlan_sg_hash_key_make(const void *p)
 {
-       const zebra_vxlan_sg_t *vxlan_sg = p;
+       const struct zebra_vxlan_sg *vxlan_sg = p;
 
        return (jhash_2words(vxlan_sg->sg.src.s_addr,
                                vxlan_sg->sg.grp.s_addr, 0));
@@ -5970,17 +5971,17 @@ static unsigned int zebra_vxlan_sg_hash_key_make(const void *p)
 
 static bool zebra_vxlan_sg_hash_eq(const void *p1, const void *p2)
 {
-       const zebra_vxlan_sg_t *sg1 = p1;
-       const zebra_vxlan_sg_t *sg2 = p2;
+       const struct zebra_vxlan_sg *sg1 = p1;
+       const struct zebra_vxlan_sg *sg2 = p2;
 
        return ((sg1->sg.src.s_addr == sg2->sg.src.s_addr)
                && (sg1->sg.grp.s_addr == sg2->sg.grp.s_addr));
 }
 
-static zebra_vxlan_sg_t *zebra_vxlan_sg_new(struct zebra_vrf *zvrf,
-               struct prefix_sg *sg)
+static struct zebra_vxlan_sg *zebra_vxlan_sg_new(struct zebra_vrf *zvrf,
+                                                struct prefix_sg *sg)
 {
-       zebra_vxlan_sg_t *vxlan_sg;
+       struct zebra_vxlan_sg *vxlan_sg;
 
        vxlan_sg = XCALLOC(MTYPE_ZVXLAN_SG, sizeof(*vxlan_sg));
 
@@ -5996,20 +5997,20 @@ static zebra_vxlan_sg_t *zebra_vxlan_sg_new(struct zebra_vrf *zvrf,
        return vxlan_sg;
 }
 
-static zebra_vxlan_sg_t *zebra_vxlan_sg_find(struct zebra_vrf *zvrf,
-                                           struct prefix_sg *sg)
+static struct zebra_vxlan_sg *zebra_vxlan_sg_find(struct zebra_vrf *zvrf,
+                                                 struct prefix_sg *sg)
 {
-       zebra_vxlan_sg_t lookup;
+       struct zebra_vxlan_sg lookup;
 
        lookup.sg = *sg;
        return hash_lookup(zvrf->vxlan_sg_table, &lookup);
 }
 
-static zebra_vxlan_sg_t *zebra_vxlan_sg_add(struct zebra_vrf *zvrf,
-                                          struct prefix_sg *sg)
+static struct zebra_vxlan_sg *zebra_vxlan_sg_add(struct zebra_vrf *zvrf,
+                                                struct prefix_sg *sg)
 {
-       zebra_vxlan_sg_t *vxlan_sg;
-       zebra_vxlan_sg_t *parent = NULL;
+       struct zebra_vxlan_sg *vxlan_sg;
+       struct zebra_vxlan_sg *parent = NULL;
        struct in_addr sip;
 
        vxlan_sg = zebra_vxlan_sg_find(zvrf, sg);
@@ -6041,7 +6042,7 @@ static zebra_vxlan_sg_t *zebra_vxlan_sg_add(struct zebra_vrf *zvrf,
        return vxlan_sg;
 }
 
-static void zebra_vxlan_sg_del(zebra_vxlan_sg_t *vxlan_sg)
+static void zebra_vxlan_sg_del(struct zebra_vxlan_sg *vxlan_sg)
 {
        struct in_addr sip;
        struct zebra_vrf *zvrf;
@@ -6072,7 +6073,7 @@ static void zebra_vxlan_sg_del(zebra_vxlan_sg_t *vxlan_sg)
 static void zebra_vxlan_sg_do_deref(struct zebra_vrf *zvrf,
                struct in_addr sip, struct in_addr mcast_grp)
 {
-       zebra_vxlan_sg_t *vxlan_sg;
+       struct zebra_vxlan_sg *vxlan_sg;
        struct prefix_sg sg;
 
        sg.family = AF_INET;
@@ -6090,10 +6091,11 @@ static void zebra_vxlan_sg_do_deref(struct zebra_vrf *zvrf,
                zebra_vxlan_sg_del(vxlan_sg);
 }
 
-static zebra_vxlan_sg_t *zebra_vxlan_sg_do_ref(struct zebra_vrf *zvrf,
-                               struct in_addr sip, struct in_addr mcast_grp)
+static struct zebra_vxlan_sg *zebra_vxlan_sg_do_ref(struct zebra_vrf *zvrf,
+                                                   struct in_addr sip,
+                                                   struct in_addr mcast_grp)
 {
-       zebra_vxlan_sg_t *vxlan_sg;
+       struct zebra_vxlan_sg *vxlan_sg;
        struct prefix_sg sg;
 
        sg.family = AF_INET;
@@ -6140,7 +6142,7 @@ static void zebra_vxlan_sg_ref(struct in_addr local_vtep_ip,
 
 static void zebra_vxlan_xg_pre_cleanup(struct hash_bucket *bucket, void *arg)
 {
-       zebra_vxlan_sg_t *vxlan_sg = (zebra_vxlan_sg_t *)bucket->data;
+       struct zebra_vxlan_sg *vxlan_sg = (struct zebra_vxlan_sg *)bucket->data;
 
        /* increment the ref count against (*,G) to prevent them from being
         * deleted
@@ -6151,7 +6153,7 @@ static void zebra_vxlan_xg_pre_cleanup(struct hash_bucket *bucket, void *arg)
 
 static void zebra_vxlan_xg_post_cleanup(struct hash_bucket *bucket, void *arg)
 {
-       zebra_vxlan_sg_t *vxlan_sg = (zebra_vxlan_sg_t *)bucket->data;
+       struct zebra_vxlan_sg *vxlan_sg = (struct zebra_vxlan_sg *)bucket->data;
 
        /* decrement the dummy ref count against (*,G) to delete them */
        if (vxlan_sg->sg.src.s_addr == INADDR_ANY) {
@@ -6164,7 +6166,7 @@ static void zebra_vxlan_xg_post_cleanup(struct hash_bucket *bucket, void *arg)
 
 static void zebra_vxlan_sg_cleanup(struct hash_bucket *bucket, void *arg)
 {
-       zebra_vxlan_sg_t *vxlan_sg = (zebra_vxlan_sg_t *)bucket->data;
+       struct zebra_vxlan_sg *vxlan_sg = (struct zebra_vxlan_sg *)bucket->data;
 
        zebra_vxlan_sg_del(vxlan_sg);
 }
@@ -6184,7 +6186,7 @@ static void zebra_vxlan_cleanup_sg_table(struct zebra_vrf *zvrf)
 
 static void zebra_vxlan_sg_replay_send(struct hash_bucket *bucket, void *arg)
 {
-       zebra_vxlan_sg_t *vxlan_sg = (zebra_vxlan_sg_t *)bucket->data;
+       struct zebra_vxlan_sg *vxlan_sg = (struct zebra_vxlan_sg *)bucket->data;
 
        zebra_vxlan_sg_send(vxlan_sg->zvrf, &vxlan_sg->sg,
                        vxlan_sg->sg_str, ZEBRA_VXLAN_SG_ADD);
index fa4718540215f0c456a0bf9edf8dcba404bf27b5..ec8b11037d437398cd53c8cb636f9d9815fbd272 100644 (file)
@@ -247,7 +247,7 @@ DECLARE_HOOK(zebra_rmac_update,
  * an aggregated table that pimd can consume without much
  * re-interpretation.
  */
-typedef struct zebra_vxlan_sg_ {
+struct zebra_vxlan_sg {
        struct zebra_vrf *zvrf;
 
        struct prefix_sg sg;
@@ -256,7 +256,7 @@ typedef struct zebra_vxlan_sg_ {
        /* For SG - num of L2 VNIs using this entry for sending BUM traffic */
        /* For XG - num of SG using this as parent */
        uint32_t ref_cnt;
-} zebra_vxlan_sg_t;
+};
 
 extern struct zebra_evpn *zevpn_lookup(vni_t vni);
 extern void zebra_vxlan_sync_mac_dp_install(struct zebra_mac *mac,