]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Convert to `struct zebra_vtep` as per our internal standard
authorDonald Sharp <sharpd@nvidia.com>
Thu, 19 Aug 2021 20:13:39 +0000 (16:13 -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_evpn.c
zebra/zebra_evpn.h
zebra/zebra_evpn_mh.h
zebra/zebra_vxlan.c

index f0d7f69f6e98f7a2bd4b36e18bd64f7816aa7d5f..d32fc1aff6503622fa4d144ec7c997bedcbfb421 100644 (file)
@@ -102,7 +102,7 @@ int advertise_svi_macip_enabled(struct zebra_evpn *zevpn)
 void zebra_evpn_print(struct zebra_evpn *zevpn, void **ctxt)
 {
        struct vty *vty;
-       zebra_vtep_t *zvtep;
+       struct zebra_vtep *zvtep;
        uint32_t num_macs;
        uint32_t num_neigh;
        json_object *json = NULL;
@@ -218,7 +218,7 @@ void zebra_evpn_print_hash(struct hash_bucket *bucket, void *ctxt[])
 {
        struct vty *vty;
        struct zebra_evpn *zevpn;
-       zebra_vtep_t *zvtep;
+       struct zebra_vtep *zvtep;
        uint32_t num_vteps = 0;
        uint32_t num_macs = 0;
        uint32_t num_neigh = 0;
@@ -1171,7 +1171,8 @@ int zebra_evpn_send_del_to_client(struct zebra_evpn *zevpn)
 /*
  * See if remote VTEP matches with prefix.
  */
-static int zebra_evpn_vtep_match(struct in_addr *vtep_ip, zebra_vtep_t *zvtep)
+static int zebra_evpn_vtep_match(struct in_addr *vtep_ip,
+                                struct zebra_vtep *zvtep)
 {
        return (IPV4_ADDR_SAME(vtep_ip, &zvtep->vtep_ip));
 }
@@ -1179,10 +1180,10 @@ static int zebra_evpn_vtep_match(struct in_addr *vtep_ip, zebra_vtep_t *zvtep)
 /*
  * Locate remote VTEP in EVPN hash table.
  */
-zebra_vtep_t *zebra_evpn_vtep_find(struct zebra_evpn *zevpn,
-                                  struct in_addr *vtep_ip)
+struct zebra_vtep *zebra_evpn_vtep_find(struct zebra_evpn *zevpn,
+                                       struct in_addr *vtep_ip)
 {
-       zebra_vtep_t *zvtep;
+       struct zebra_vtep *zvtep;
 
        if (!zevpn)
                return NULL;
@@ -1198,13 +1199,14 @@ zebra_vtep_t *zebra_evpn_vtep_find(struct zebra_evpn *zevpn,
 /*
  * Add remote VTEP to EVPN hash table.
  */
-zebra_vtep_t *zebra_evpn_vtep_add(struct zebra_evpn *zevpn,
-                                 struct in_addr *vtep_ip, int flood_control)
+struct zebra_vtep *zebra_evpn_vtep_add(struct zebra_evpn *zevpn,
+                                      struct in_addr *vtep_ip,
+                                      int flood_control)
 
 {
-       zebra_vtep_t *zvtep;
+       struct zebra_vtep *zvtep;
 
-       zvtep = XCALLOC(MTYPE_ZEVPN_VTEP, sizeof(zebra_vtep_t));
+       zvtep = XCALLOC(MTYPE_ZEVPN_VTEP, sizeof(struct zebra_vtep));
 
        zvtep->vtep_ip = *vtep_ip;
        zvtep->flood_control = flood_control;
@@ -1220,7 +1222,7 @@ zebra_vtep_t *zebra_evpn_vtep_add(struct zebra_evpn *zevpn,
 /*
  * Remove remote VTEP from EVPN hash table.
  */
-int zebra_evpn_vtep_del(struct zebra_evpn *zevpn, zebra_vtep_t *zvtep)
+int zebra_evpn_vtep_del(struct zebra_evpn *zevpn, struct zebra_vtep *zvtep)
 {
        if (zvtep->next)
                zvtep->next->prev = zvtep->prev;
@@ -1241,7 +1243,7 @@ int zebra_evpn_vtep_del(struct zebra_evpn *zevpn, zebra_vtep_t *zvtep)
  */
 int zebra_evpn_vtep_del_all(struct zebra_evpn *zevpn, int uninstall)
 {
-       zebra_vtep_t *zvtep, *zvtep_next;
+       struct zebra_vtep *zvtep, *zvtep_next;
 
        if (!zevpn)
                return -1;
@@ -1260,7 +1262,7 @@ int zebra_evpn_vtep_del_all(struct zebra_evpn *zevpn, int uninstall)
  * Install remote VTEP into the kernel if the remote VTEP has asked
  * for head-end-replication.
  */
-int zebra_evpn_vtep_install(struct zebra_evpn *zevpn, zebra_vtep_t *zvtep)
+int zebra_evpn_vtep_install(struct zebra_evpn *zevpn, struct zebra_vtep *zvtep)
 {
        if (is_vxlan_flooding_head_end() &&
            (zvtep->flood_control == VXLAN_FLOOD_HEAD_END_REPL)) {
@@ -1299,7 +1301,7 @@ void zebra_evpn_handle_flooding_remote_vteps(struct hash_bucket *bucket,
                                             void *zvrf)
 {
        struct zebra_evpn *zevpn;
-       zebra_vtep_t *zvtep;
+       struct zebra_vtep *zvtep;
 
        zevpn = (struct zebra_evpn *)bucket->data;
        if (!zevpn)
@@ -1391,7 +1393,7 @@ void zebra_evpn_rem_macip_add(vni_t vni, const struct ethaddr *macaddr,
                              struct in_addr vtep_ip, const esi_t *esi)
 {
        struct zebra_evpn *zevpn;
-       zebra_vtep_t *zvtep;
+       struct zebra_vtep *zvtep;
        zebra_mac_t *mac = NULL;
        struct interface *ifp = NULL;
        struct zebra_if *zif = NULL;
index 0fc65500d4cdf0d9d95a6c584b5e6551d86bc826..2c84d23045a47eb117cd503bcd68fbefe292a6db 100644 (file)
@@ -38,8 +38,6 @@
 extern "C" {
 #endif
 
-typedef struct zebra_vtep_t_ zebra_vtep_t;
-
 RB_HEAD(zebra_es_evi_rb_head, zebra_evpn_es_evi);
 RB_PROTOTYPE(zebra_es_evi_rb_head, zebra_evpn_es_evi, rb_node,
             zebra_es_evi_rb_cmp);
@@ -57,7 +55,7 @@ struct zebra_evpn_show {
  *
  * Right now, this just has each remote VTEP's IP address.
  */
-struct zebra_vtep_t_ {
+struct zebra_vtep {
        /* Remote IP. */
        /* NOTE: Can only be IPv4 right now. */
        struct in_addr vtep_ip;
@@ -67,8 +65,8 @@ struct zebra_vtep_t_ {
        int flood_control;
 
        /* Links. */
-       struct zebra_vtep_t_ *next;
-       struct zebra_vtep_t_ *prev;
+       struct zebra_vtep *next;
+       struct zebra_vtep *prev;
 };
 
 /*
@@ -101,7 +99,7 @@ struct zebra_evpn {
        struct interface *svi_if;
 
        /* List of remote VTEPs */
-       zebra_vtep_t *vteps;
+       struct zebra_vtep *vteps;
 
        /* Local IP */
        struct in_addr local_vtep_ip;
@@ -194,13 +192,14 @@ struct zebra_evpn *zebra_evpn_add(vni_t vni);
 int zebra_evpn_del(struct zebra_evpn *zevpn);
 int zebra_evpn_send_add_to_client(struct zebra_evpn *zevpn);
 int zebra_evpn_send_del_to_client(struct zebra_evpn *zevpn);
-zebra_vtep_t *zebra_evpn_vtep_find(struct zebra_evpn *zevpn,
-                                  struct in_addr *vtep_ip);
-zebra_vtep_t *zebra_evpn_vtep_add(struct zebra_evpn *zevpn,
-                                 struct in_addr *vtep_ip, int flood_control);
-int zebra_evpn_vtep_del(struct zebra_evpn *zevpn, zebra_vtep_t *zvtep);
+struct zebra_vtep *zebra_evpn_vtep_find(struct zebra_evpn *zevpn,
+                                       struct in_addr *vtep_ip);
+struct zebra_vtep *zebra_evpn_vtep_add(struct zebra_evpn *zevpn,
+                                      struct in_addr *vtep_ip,
+                                      int flood_control);
+int zebra_evpn_vtep_del(struct zebra_evpn *zevpn, struct zebra_vtep *zvtep);
 int zebra_evpn_vtep_del_all(struct zebra_evpn *zevpn, int uninstall);
-int zebra_evpn_vtep_install(struct zebra_evpn *zevpn, zebra_vtep_t *zvtep);
+int zebra_evpn_vtep_install(struct zebra_evpn *zevpn, struct zebra_vtep *zvtep);
 int zebra_evpn_vtep_uninstall(struct zebra_evpn *zevpn,
                              struct in_addr *vtep_ip);
 void zebra_evpn_handle_flooding_remote_vteps(struct hash_bucket *bucket,
index 5b2d392753d9f4e616aafa99f15c48bed743442f..fff7f005dbc31ce1dbd6719636f37874dcb2f1b1 100644 (file)
@@ -168,7 +168,7 @@ struct zebra_evpn_es_vtep {
        uint8_t df_alg;
        uint32_t df_pref;
 
-       /* XXX - maintain a backpointer to zebra_vtep_t */
+       /* XXX - maintain a backpointer to struct zebra_vtep */
 };
 
 /* Local/access-side broadcast domain - zebra_evpn_access_bd is added to -
index 574a25ce78cabe95528654db3add70d6741fbd44..d2cb8da9aaa542cfc5d4457f3b26ff37766a7907 100644 (file)
@@ -3938,7 +3938,7 @@ int zebra_vxlan_check_readd_vtep(struct interface *ifp,
        struct zebra_l2info_vxlan *vxl;
        vni_t vni;
        struct zebra_evpn *zevpn = NULL;
-       zebra_vtep_t *zvtep = NULL;
+       struct zebra_vtep *zvtep = NULL;
 
        zif = ifp->info;
        assert(zif);
@@ -4271,7 +4271,7 @@ void zebra_vxlan_remote_vtep_del(vrf_id_t vrf_id, vni_t vni,
                                 struct in_addr vtep_ip)
 {
        struct zebra_evpn *zevpn;
-       zebra_vtep_t *zvtep;
+       struct zebra_vtep *zvtep;
        struct interface *ifp;
        struct zebra_if *zif;
        struct zebra_vrf *zvrf;
@@ -4337,7 +4337,7 @@ void zebra_vxlan_remote_vtep_add(vrf_id_t vrf_id, vni_t vni,
        struct zebra_evpn *zevpn;
        struct interface *ifp;
        struct zebra_if *zif;
-       zebra_vtep_t *zvtep;
+       struct zebra_vtep *zvtep;
        struct zebra_vrf *zvrf;
 
        if (!is_evpn_enabled()) {