Skip to content

Commit

Permalink
Remove redundant address-family field from table structure
Browse files Browse the repository at this point in the history
This is already present as the key of the map that encloses these stats

Change-Id: I28f4d8fbd79dd8b1fe55872a34fd867a32b24fec
Partial-Bug: #1576437
  • Loading branch information
ananth-at-camphor-networks committed Jul 22, 2016
1 parent 84e4def commit 003c45d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions src/bgp/bgp_server.cc
Expand Up @@ -782,10 +782,6 @@ uint32_t BgpServer::SendTableStatsUve(bool first) const {
}

if (changed) {

// Set the address family to be able to find to which family,
// the associated updated stats are applicable.
table->stats()->set_address_family(family);
tables_stats.insert(make_pair(family, *table->stats()));

// Reset changed flags in the uve structure.
Expand Down
2 changes: 1 addition & 1 deletion src/bgp/bgp_table.sandesh
Expand Up @@ -7,7 +7,7 @@ include "bgp/table_info.sandesh"
struct RoutingInstanceStatsData {
1: string name (key="ObjectRoutingInstance");
2: optional bool deleted
3: optional map<string, table_info.BgpTableStats> table_stats (tags=".address_family");
3: optional map<string, table_info.BgpTableStats> table_stats (tags=".__key");
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/bgp/table_info.sandesh
Expand Up @@ -3,7 +3,6 @@
*/

struct BgpTableStats {
1: optional string address_family;
2: optional u64 prefixes;
3: optional u64 primary_paths;
4: optional u64 secondary_paths;
Expand Down

0 comments on commit 003c45d

Please sign in to comment.