summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_evpn.c30
-rw-r--r--bgpd/bgp_route.h2
-rw-r--r--bgpd/bgp_vty.h6
3 files changed, 7 insertions, 31 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c
index 12cc425bd3..824b72b240 100644
--- a/bgpd/bgp_evpn.c
+++ b/bgpd/bgp_evpn.c
@@ -99,19 +99,8 @@ static unsigned int vrf_import_rt_hash_key_make(void *p)
{
struct vrf_irt_node *irt = p;
char *pnt = irt->rt.val;
- unsigned int key = 0;
- int c = 0;
-
- key += pnt[c];
- key += pnt[c + 1];
- key += pnt[c + 2];
- key += pnt[c + 3];
- key += pnt[c + 4];
- key += pnt[c + 5];
- key += pnt[c + 6];
- key += pnt[c + 7];
-
- return key;
+
+ return jhash(pnt, 8, 0x5abc1234);
}
/*
@@ -224,19 +213,8 @@ static unsigned int import_rt_hash_key_make(void *p)
{
struct irt_node *irt = p;
char *pnt = irt->rt.val;
- unsigned int key = 0;
- int c = 0;
-
- key += pnt[c];
- key += pnt[c + 1];
- key += pnt[c + 2];
- key += pnt[c + 3];
- key += pnt[c + 4];
- key += pnt[c + 5];
- key += pnt[c + 6];
- key += pnt[c + 7];
-
- return (key);
+
+ return jhash(pnt, 8, 0xdeadbeef);
}
/*
diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h
index ae4759aad0..fc15720ebc 100644
--- a/bgpd/bgp_route.h
+++ b/bgpd/bgp_route.h
@@ -418,8 +418,6 @@ extern void bgp_peer_clear_node_queue_drain_immediate(struct peer *peer);
extern void bgp_process_queues_drain_immediate(void);
/* for encap/vpn */
-extern struct bgp_node *bgp_afi_node_get(struct bgp_table *, afi_t, safi_t,
- struct prefix *, struct prefix_rd *);
extern struct bgp_node *bgp_afi_node_lookup(struct bgp_table *table, afi_t afi,
safi_t safi, struct prefix *p,
struct prefix_rd *prd);
diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h
index e456f7caed..cbb41f0840 100644
--- a/bgpd/bgp_vty.h
+++ b/bgpd/bgp_vty.h
@@ -44,9 +44,9 @@ struct bgp;
"Address Family modifier\n"
extern void bgp_vty_init(void);
-extern const char *afi_safi_print(afi_t, safi_t);
-extern const char *afi_safi_json(afi_t, safi_t);
-extern void bgp_config_write_update_delay(struct vty *, struct bgp *);
+extern const char *afi_safi_print(afi_t afi, safi_t safi);
+extern const char *afi_safi_json(afi_t afi, safi_t safi);
+extern void bgp_config_write_update_delay(struct vty *vty, struct bgp *bgp);
extern void bgp_config_write_wpkt_quanta(struct vty *vty, struct bgp *bgp);
extern void bgp_config_write_rpkt_quanta(struct vty *vty, struct bgp *bgp);
extern void bgp_config_write_listen(struct vty *vty, struct bgp *bgp);