From 8b4877504374edbe5bba43d14ceb7cb4b2e25f05 Mon Sep 17 00:00:00 2001 From: Ananth Suryanarayana Date: Thu, 21 Jul 2016 17:26:39 -0700 Subject: [PATCH] Remove redundant address-family field from table structure This is already present as the key of the map that encloses these stats Change-Id: I28f4d8fbd79dd8b1fe55872a34fd867a32b24fec Partial-Bug: #1576437 --- src/bgp/bgp_server.cc | 4 ---- src/bgp/bgp_table.sandesh | 2 +- src/bgp/table_info.sandesh | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/bgp/bgp_server.cc b/src/bgp/bgp_server.cc index 998361ca1fc..efee17cdf2f 100644 --- a/src/bgp/bgp_server.cc +++ b/src/bgp/bgp_server.cc @@ -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. diff --git a/src/bgp/bgp_table.sandesh b/src/bgp/bgp_table.sandesh index 9087da03f2f..bcd337d5742 100644 --- a/src/bgp/bgp_table.sandesh +++ b/src/bgp/bgp_table.sandesh @@ -7,7 +7,7 @@ include "bgp/table_info.sandesh" struct RoutingInstanceStatsData { 1: string name (key="ObjectRoutingInstance"); 2: optional bool deleted - 3: optional map table_stats (tags=".address_family"); + 3: optional map table_stats (tags=".__key"); } /** diff --git a/src/bgp/table_info.sandesh b/src/bgp/table_info.sandesh index a3ab2f0996b..f1650613165 100644 --- a/src/bgp/table_info.sandesh +++ b/src/bgp/table_info.sandesh @@ -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;