Merge pull request #1702 from donaldsharp/bgp_cleanup

Bgp cleanup
This commit is contained in:
Lou Berger 2018-02-05 16:06:08 -06:00 committed by GitHub
commit cfd0d6de7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 29 deletions

View File

@ -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);
}
/*

View File

@ -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);

View File

@ -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);