diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-08-19 16:08:53 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-09-02 10:33:22 -0400 |
| commit | f6371c343a25f9a6a17aff38a3d35d14ca0f6bde (patch) | |
| tree | fb1e4b91888d51c29333afaad8ec03ac5f14c3f6 /zebra/zebra_evpn_neigh.c | |
| parent | c2ad0a0d40ff3860f6e48d2a8b5cb853a97f2543 (diff) | |
zebra: Convert to `struct zebra_evpn` as per our internal standard
We do not use typedef's to talk about structures as per our standard.
Fixing.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_evpn_neigh.c')
| -rw-r--r-- | zebra/zebra_evpn_neigh.c | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/zebra/zebra_evpn_neigh.c b/zebra/zebra_evpn_neigh.c index 839e8d9ebc..41c95ae2f7 100644 --- a/zebra/zebra_evpn_neigh.c +++ b/zebra/zebra_evpn_neigh.c @@ -88,7 +88,7 @@ struct hash *zebra_neigh_db_create(const char *desc) return hash_create_size(8, neigh_hash_keymake, neigh_cmp, desc); } -uint32_t num_dup_detected_neighs(zebra_evpn_t *zevpn) +uint32_t num_dup_detected_neighs(struct zebra_evpn *zevpn) { unsigned int i; uint32_t num_neighs = 0; @@ -150,7 +150,7 @@ int remote_neigh_count(zebra_mac_t *zmac) /* * Install remote neighbor into the kernel. */ -int zebra_evpn_rem_neigh_install(zebra_evpn_t *zevpn, zebra_neigh_t *n, +int zebra_evpn_rem_neigh_install(struct zebra_evpn *zevpn, zebra_neigh_t *n, bool was_static) { struct interface *vlan_if; @@ -468,7 +468,7 @@ static void zebra_evpn_local_neigh_deref_mac(zebra_neigh_t *n, bool send_mac_update) { zebra_mac_t *mac = n->mac; - zebra_evpn_t *zevpn = n->zevpn; + struct zebra_evpn *zevpn = n->zevpn; bool old_static; bool new_static; @@ -496,7 +496,7 @@ static void zebra_evpn_local_neigh_deref_mac(zebra_neigh_t *n, zebra_evpn_deref_ip2mac(zevpn, mac); } -bool zebra_evpn_neigh_is_bgp_seq_ok(zebra_evpn_t *zevpn, zebra_neigh_t *n, +bool zebra_evpn_neigh_is_bgp_seq_ok(struct zebra_evpn *zevpn, zebra_neigh_t *n, const struct ethaddr *macaddr, uint32_t seq, bool sync) { @@ -542,7 +542,7 @@ bool zebra_evpn_neigh_is_bgp_seq_ok(zebra_evpn_t *zevpn, zebra_neigh_t *n, /* * Add neighbor entry. */ -static zebra_neigh_t *zebra_evpn_neigh_add(zebra_evpn_t *zevpn, +static zebra_neigh_t *zebra_evpn_neigh_add(struct zebra_evpn *zevpn, const struct ipaddr *ip, const struct ethaddr *mac, zebra_mac_t *zmac, uint32_t n_flags) @@ -572,7 +572,7 @@ static zebra_neigh_t *zebra_evpn_neigh_add(zebra_evpn_t *zevpn, /* * Delete neighbor entry. */ -int zebra_evpn_neigh_del(zebra_evpn_t *zevpn, zebra_neigh_t *n) +int zebra_evpn_neigh_del(struct zebra_evpn *zevpn, zebra_neigh_t *n) { zebra_neigh_t *tmp_n; @@ -614,7 +614,7 @@ void zebra_evpn_sync_neigh_del(zebra_neigh_t *n) } zebra_neigh_t * -zebra_evpn_proc_sync_neigh_update(zebra_evpn_t *zevpn, zebra_neigh_t *n, +zebra_evpn_proc_sync_neigh_update(struct zebra_evpn *zevpn, zebra_neigh_t *n, uint16_t ipa_len, const struct ipaddr *ipaddr, uint8_t flags, uint32_t seq, const esi_t *esi, struct sync_mac_ip_ctx *ctx) @@ -816,7 +816,8 @@ zebra_evpn_proc_sync_neigh_update(zebra_evpn_t *zevpn, zebra_neigh_t *n, /* * Uninstall remote neighbor from the kernel. */ -static int zebra_evpn_neigh_uninstall(zebra_evpn_t *zevpn, zebra_neigh_t *n) +static int zebra_evpn_neigh_uninstall(struct zebra_evpn *zevpn, + zebra_neigh_t *n) { struct interface *vlan_if; @@ -874,7 +875,7 @@ static void zebra_evpn_neigh_del_hash_entry(struct hash_bucket *bucket, /* * Delete all neighbor entries for this EVPN. */ -void zebra_evpn_neigh_del_all(zebra_evpn_t *zevpn, int uninstall, +void zebra_evpn_neigh_del_all(struct zebra_evpn *zevpn, int uninstall, int upd_client, uint32_t flags) { struct neigh_walk_ctx wctx; @@ -895,7 +896,7 @@ void zebra_evpn_neigh_del_all(zebra_evpn_t *zevpn, int uninstall, /* * Look up neighbor hash entry. */ -zebra_neigh_t *zebra_evpn_neigh_lookup(zebra_evpn_t *zevpn, +zebra_neigh_t *zebra_evpn_neigh_lookup(struct zebra_evpn *zevpn, const struct ipaddr *ip) { zebra_neigh_t tmp; @@ -912,7 +913,7 @@ zebra_neigh_t *zebra_evpn_neigh_lookup(zebra_evpn_t *zevpn, * Process all neighbors associated with a MAC upon the MAC being learnt * locally or undergoing any other change (such as sequence number). */ -void zebra_evpn_process_neigh_on_local_mac_change(zebra_evpn_t *zevpn, +void zebra_evpn_process_neigh_on_local_mac_change(struct zebra_evpn *zevpn, zebra_mac_t *zmac, bool seq_change, bool es_change) @@ -956,7 +957,7 @@ void zebra_evpn_process_neigh_on_local_mac_change(zebra_evpn_t *zevpn, * Process all neighbors associated with a local MAC upon the MAC being * deleted. */ -void zebra_evpn_process_neigh_on_local_mac_del(zebra_evpn_t *zevpn, +void zebra_evpn_process_neigh_on_local_mac_del(struct zebra_evpn *zevpn, zebra_mac_t *zmac) { zebra_neigh_t *n = NULL; @@ -989,7 +990,7 @@ void zebra_evpn_process_neigh_on_local_mac_del(zebra_evpn_t *zevpn, * Process all neighbors associated with a MAC upon the MAC being remotely * learnt. */ -void zebra_evpn_process_neigh_on_remote_mac_add(zebra_evpn_t *zevpn, +void zebra_evpn_process_neigh_on_remote_mac_add(struct zebra_evpn *zevpn, zebra_mac_t *zmac) { zebra_neigh_t *n = NULL; @@ -1019,7 +1020,7 @@ void zebra_evpn_process_neigh_on_remote_mac_add(zebra_evpn_t *zevpn, * Process all neighbors associated with a remote MAC upon the MAC being * deleted. */ -void zebra_evpn_process_neigh_on_remote_mac_del(zebra_evpn_t *zevpn, +void zebra_evpn_process_neigh_on_remote_mac_del(struct zebra_evpn *zevpn, zebra_mac_t *zmac) { /* NOTE: Currently a NO-OP. */ @@ -1094,7 +1095,7 @@ static int zebra_evpn_dad_ip_auto_recovery_exp(struct thread *t) { struct zebra_vrf *zvrf = NULL; zebra_neigh_t *nbr = NULL; - zebra_evpn_t *zevpn = NULL; + struct zebra_evpn *zevpn = NULL; nbr = THREAD_ARG(t); @@ -1254,7 +1255,8 @@ zebra_evpn_dup_addr_detect_for_neigh(struct zebra_vrf *zvrf, zebra_neigh_t *nbr, } } -int zebra_evpn_local_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp, +int zebra_evpn_local_neigh_update(struct zebra_evpn *zevpn, + struct interface *ifp, const struct ipaddr *ip, const struct ethaddr *macaddr, bool is_router, bool local_inactive, bool dp_static) @@ -1596,7 +1598,8 @@ int zebra_evpn_local_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp, return 0; } -int zebra_evpn_remote_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp, +int zebra_evpn_remote_neigh_update(struct zebra_evpn *zevpn, + struct interface *ifp, const struct ipaddr *ip, const struct ethaddr *macaddr, uint16_t state) @@ -1664,7 +1667,7 @@ zebra_evpn_send_neigh_hash_entry_to_client(struct hash_bucket *bucket, } /* Iterator of a specific EVPN */ -void zebra_evpn_send_neigh_to_client(zebra_evpn_t *zevpn) +void zebra_evpn_send_neigh_to_client(struct zebra_evpn *zevpn) { struct neigh_walk_ctx wctx; @@ -1679,7 +1682,7 @@ void zebra_evpn_clear_dup_neigh_hash(struct hash_bucket *bucket, void *ctxt) { struct neigh_walk_ctx *wctx = ctxt; zebra_neigh_t *nbr; - zebra_evpn_t *zevpn; + struct zebra_evpn *zevpn; char buf[INET6_ADDRSTRLEN]; nbr = (zebra_neigh_t *)bucket->data; @@ -2048,7 +2051,7 @@ void zebra_evpn_print_dad_neigh_hash_detail(struct hash_bucket *bucket, zebra_evpn_print_neigh_hash_detail(bucket, ctxt); } -void zebra_evpn_neigh_remote_macip_add(zebra_evpn_t *zevpn, +void zebra_evpn_neigh_remote_macip_add(struct zebra_evpn *zevpn, struct zebra_vrf *zvrf, const struct ipaddr *ipaddr, zebra_mac_t *mac, struct in_addr vtep_ip, @@ -2182,8 +2185,9 @@ void zebra_evpn_neigh_remote_macip_add(zebra_evpn_t *zevpn, n->rem_seq = seq; } -int zebra_evpn_neigh_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn, - struct ipaddr *ip, zebra_mac_t *mac) +int zebra_evpn_neigh_gw_macip_add(struct interface *ifp, + struct zebra_evpn *zevpn, struct ipaddr *ip, + zebra_mac_t *mac) { zebra_neigh_t *n; @@ -2241,7 +2245,7 @@ int zebra_evpn_neigh_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn, return 0; } -void zebra_evpn_neigh_remote_uninstall(zebra_evpn_t *zevpn, +void zebra_evpn_neigh_remote_uninstall(struct zebra_evpn *zevpn, struct zebra_vrf *zvrf, zebra_neigh_t *n, zebra_mac_t *mac, const struct ipaddr *ipaddr) @@ -2277,7 +2281,7 @@ void zebra_evpn_neigh_remote_uninstall(zebra_evpn_t *zevpn, } } -int zebra_evpn_neigh_del_ip(zebra_evpn_t *zevpn, const struct ipaddr *ip) +int zebra_evpn_neigh_del_ip(struct zebra_evpn *zevpn, const struct ipaddr *ip) { zebra_neigh_t *n; zebra_mac_t *zmac; |
