OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vrouter_uve_entry.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #include <sstream>
6 #include <fstream>
8 #include <cfg/cfg_init.h>
9 #include <init/agent_param.h>
10 #include <oper/interface_common.h>
11 #include <oper/interface.h>
12 #include <oper/vm.h>
13 #include <oper/vn.h>
14 #include <oper/mirror_table.h>
16 #include <uve/agent_uve_stats.h>
17 #include <uve/vrouter_uve_entry.h>
18 #include <cmn/agent_stats.h>
19 #include <base/cpuinfo.h>
20 #include <base/util.h>
21 #include <cmn/agent_cmn.h>
23 
24 using namespace std;
25 
27  : VrouterUveEntryBase(agent), bandwidth_count_(0), port_bitmap_(),
28  flow_info_(), vrf_walk_id_(DBTableWalker::kInvalidWalkerId) {
30 }
31 
33 }
34 
36  static bool first = true;
37  VrouterStatsAgent stats;
38 
40 
41  stats.set_name(agent_->agent_name());
42 
43  if (prev_stats_.get_in_tpkts() !=
44  agent_->stats()->in_pkts() || first) {
45  stats.set_in_tpkts(agent_->stats()->in_pkts());
46  prev_stats_.set_in_tpkts(agent_->stats()->in_pkts());
47  }
48 
49  if (prev_stats_.get_in_bytes() !=
50  agent_->stats()->in_bytes() || first) {
51  stats.set_in_bytes(agent_->stats()->in_bytes());
52  prev_stats_.set_in_bytes(agent_->stats()->in_bytes());
53  }
54 
55  if (prev_stats_.get_out_tpkts() !=
56  agent_->stats()->out_pkts() || first) {
57  stats.set_out_tpkts(agent_->stats()->out_pkts());
58  prev_stats_.set_out_tpkts(agent_->stats()->out_pkts());
59  }
60 
61  if (prev_stats_.get_out_bytes() !=
62  agent_->stats()->out_bytes() || first) {
63  stats.set_out_bytes(agent_->stats()->out_bytes());
64  prev_stats_.set_out_bytes(agent_->stats()->out_bytes());
65  }
66 
67  if (prev_stats_.get_exception_packets() !=
68  agent_->stats()->pkt_exceptions() || first) {
69  stats.set_exception_packets(agent_->stats()->pkt_exceptions());
70  prev_stats_.set_exception_packets(agent_->stats()->pkt_exceptions());
71  }
72 
73  if (prev_stats_.get_exception_packets_dropped() !=
74  agent_->stats()->pkt_dropped() || first) {
75  stats.set_exception_packets_dropped(agent_->stats()->pkt_dropped());
76  prev_stats_.set_exception_packets_dropped(agent_->stats()->
77  pkt_dropped());
78  }
79 
80  uint64_t e_pkts_allowed = (agent_->stats()->pkt_exceptions() -
81  agent_->stats()->pkt_dropped());
82  if (prev_stats_.get_exception_packets_allowed() != e_pkts_allowed) {
83  stats.set_exception_packets_allowed(e_pkts_allowed);
84  prev_stats_.set_exception_packets_allowed(e_pkts_allowed);
85  }
86 
87  if (prev_stats_.get_total_flows() !=
88  agent_->stats()->flow_created() || first) {
89  stats.set_total_flows(agent_->stats()->flow_created());
90  prev_stats_.set_total_flows(agent_->stats()->
91  flow_created());
92  }
93 
94  if (prev_stats_.get_aged_flows() !=
95  agent_->stats()->flow_aged() || first) {
96  stats.set_aged_flows(agent_->stats()->flow_aged());
97  prev_stats_.set_aged_flows(agent_->stats()->flow_aged());
98  }
99  map<string, PhyIfStats> phy_if_list;
100  map<string, PhyIfInfo> phy_if_info;
101  map<string, AgentDropStats> phy_if_ds;
102  BuildPhysicalInterfaceList(phy_if_list, phy_if_info, phy_if_ds);
103  stats.set_raw_phy_if_stats(phy_if_list);
104  stats.set_raw_phy_if_drop_stats(phy_if_ds);
105 
106  if (prev_stats_.get_phy_if_info() != phy_if_info) {
107  stats.set_phy_if_info(phy_if_info);
108  prev_stats_.set_phy_if_info(phy_if_info);
109  }
110 
112  if (first) {
113  InitPrevStats();
114  //First sample of bandwidth is sent after 1.5, 5.5 and 10.5 minutes
115  bandwidth_count_ = 0;
116  }
117  // 1 minute bandwidth
119  vector<AgentIfBandwidth> phy_if_blist;
120  double in_util = 0, out_util = 0;
121  map<string,uint64_t> inb,outb;
122  BuildPhysicalInterfaceBandwidth(inb, outb, 1, in_util, out_util);
123  /* One minute bandwidth has 'tags' annotation and has to be sent
124  * always regardless of change in bandwidth or not */
125  stats.set_phy_band_in_bps(inb);
126  stats.set_phy_band_out_bps(outb);
127  if (in_util != prev_stats_.get_total_in_bandwidth_utilization()) {
128  stats.set_total_in_bandwidth_utilization(in_util);
129  prev_stats_.set_total_in_bandwidth_utilization(in_util);
130  }
131  if (out_util != prev_stats_.get_total_out_bandwidth_utilization()) {
132  stats.set_total_out_bandwidth_utilization(out_util);
133  prev_stats_.set_total_out_bandwidth_utilization(out_util);
134  }
135  }
136 
137  // 5 minute bandwidth
139  vector<AgentIfBandwidth> phy_if_blist;
140  BuildPhysicalInterfaceBandwidth(phy_if_blist, 5);
141  if (prev_stats_.get_phy_if_5min_usage() != phy_if_blist) {
142  stats.set_phy_if_5min_usage(phy_if_blist);
143  prev_stats_.set_phy_if_5min_usage(phy_if_blist);
144  }
145  }
146 
147  VmInterfaceKey key(AgentKey::ADD_DEL_CHANGE, boost::uuids::nil_uuid(),
149  const Interface *vhost = static_cast<const Interface *>
151  AgentUveStats *uve = static_cast<AgentUveStats *>(agent_->uve());
153  uve->stats_manager()->GetInterfaceStats(vhost);
154  if (s != NULL) {
155  AgentIfStats vhost_stats;
156  AgentDropStats vhost_ds;
157  vhost_stats.set_name(agent_->vhost_interface_name());
158  vhost_stats.set_in_pkts(s->in_pkts);
159  vhost_stats.set_in_bytes(s->in_bytes);
160  vhost_stats.set_out_pkts(s->out_pkts);
161  vhost_stats.set_out_bytes(s->out_bytes);
162  vhost_stats.set_speed(s->speed);
163  vhost_stats.set_duplexity(s->duplexity);
164  uve->stats_manager()->BuildDropStats(s->drop_stats, vhost_ds);
165  stats.set_raw_vhost_stats(vhost_stats);
166  stats.set_raw_vhost_drop_stats(vhost_ds);
167  }
168 
169  SetVrouterPortBitmap(stats);
170 
171  AgentDropStats ds;
172  FetchDropStats(ds);
173  stats.set_raw_drop_stats(ds);
174 
175  if (first) {
176  stats.set_uptime(start_time_);
177  }
179  AgentStats::FlowCounters &deleted = agent_->stats()->deleted();
180  uint32_t active_flows = agent_->pkt()->get_flow_proto()->FlowCount();
181 
182  VrouterFlowRate flow_rate;
183  bool built = uve->stats_manager()->BuildFlowRate(added, deleted, flow_info_,
184  flow_rate);
185  if (built) {
186  flow_rate.set_active_flows(active_flows);
187  stats.set_flow_rate(flow_rate);
188  }
189 
191  first = false;
192 
193  //Send VrouterControlStats UVE
195  return true;
196 }
197 
198 uint64_t VrouterUveEntry::CalculateBandwitdh(uint64_t bytes, int speed_mbps,
199  int diff_seconds,
200  double *utilization_bps) const {
201  if (utilization_bps) *utilization_bps = 0;
202  if (bytes == 0 || speed_mbps == 0) {
203  return 0;
204  }
205  uint64_t bits = bytes * 8;
206  if (diff_seconds == 0) {
207  return 0;
208  }
209  /* Compute bandwidth in bps */
210  uint64_t bps = bits/diff_seconds;
211 
212  /* Compute network utilization in percentage */
213  uint64_t speed_bps = speed_mbps * 1024 * 1024;
214  double bps_double = bits/diff_seconds;
215  if (utilization_bps) *utilization_bps = (bps_double * 100)/speed_bps;
216  return bps;
217 }
218 
220  bool dir_in, int mins,
221  double *util) const {
222 
223  uint64_t bytes;
224  if (dir_in) {
225  switch (mins) {
226  case 1:
227  bytes = s->in_bytes - s->prev_in_bytes;
228  s->prev_in_bytes = s->in_bytes;
229  break;
230  default:
231  bytes = s->in_bytes - s->prev_5min_in_bytes;
233  break;
234  }
235  } else {
236  switch (mins) {
237  case 1:
238  bytes = s->out_bytes - s->prev_out_bytes;
239  s->prev_out_bytes = s->out_bytes;
240  break;
241  default:
242  bytes = s->out_bytes - s->prev_5min_out_bytes;
244  break;
245  }
246  }
247  return CalculateBandwitdh(bytes, s->speed, (mins * 60), util);
248 }
249 
250 bool VrouterUveEntry::BuildPhysicalInterfaceList(map<string, PhyIfStats> &list,
251  map<string, PhyIfInfo> &info,
252  map<string, AgentDropStats> &dsmap)
253  const {
254  bool changed = false;
255  PhysicalInterfaceSet::const_iterator it = phy_intf_set_.begin();
256  while (it != phy_intf_set_.end()) {
257  const Interface *intf = *it;
258  ++it;
259  AgentUveStats *uve = static_cast<AgentUveStats *>(agent_->uve());
261  uve->stats_manager()->GetInterfaceStats(intf);
262  if (s == NULL) {
263  continue;
264  }
265  PhyIfStats phy_stat_entry;
266  phy_stat_entry.set_in_pkts(s->in_pkts);
267  phy_stat_entry.set_in_bytes(s->in_bytes);
268  phy_stat_entry.set_out_pkts(s->out_pkts);
269  phy_stat_entry.set_out_bytes(s->out_bytes);
270  list.insert(make_pair(intf->name(), phy_stat_entry));
271 
272  PhyIfInfo phy_if_info;
273  phy_if_info.set_speed(s->speed);
274  phy_if_info.set_duplexity(s->duplexity);
275  info.insert(make_pair(intf->name(), phy_if_info));
276 
277  AgentDropStats ds;
278  uve->stats_manager()->BuildDropStats(s->drop_stats, ds);
279  dsmap.insert(make_pair(intf->name(), ds));
280  changed = true;
281  }
282  return changed;
283 }
284 
286  (vector<AgentIfBandwidth> &phy_if_list, uint8_t mins) const {
287  uint64_t in_band, out_band;
288  bool changed = false;
289 
290  PhysicalInterfaceSet::const_iterator it = phy_intf_set_.begin();
291  while (it != phy_intf_set_.end()) {
292  const Interface *intf = *it;
293  AgentUveStats *uve = static_cast<AgentUveStats *>(agent_->uve());
295  uve->stats_manager()->GetInterfaceStats(intf);
296  if (s == NULL) {
297  continue;
298  }
299  AgentIfBandwidth phy_stat_entry;
300  phy_stat_entry.set_name(intf->name());
301  in_band = GetBandwidthUsage(s, true, mins, NULL);
302  out_band = GetBandwidthUsage(s, false, mins, NULL);
303  phy_stat_entry.set_in_bandwidth_usage(in_band);
304  phy_stat_entry.set_out_bandwidth_usage(out_band);
305  phy_if_list.push_back(phy_stat_entry);
306  changed = true;
307  ++it;
308  }
309  return changed;
310 }
311 
313  (map<string,uint64_t> &imp, map<string,uint64_t> &omp,
314  uint8_t mins, double &in_avg_util,
315  double &out_avg_util) const {
316  uint64_t in_band, out_band;
317  double in_util, out_util;
318  bool changed = false;
319  int num_intfs = 0;
320  in_avg_util = 0;
321  out_avg_util = 0;
322 
323  PhysicalInterfaceSet::const_iterator it = phy_intf_set_.begin();
324  while (it != phy_intf_set_.end()) {
325  const Interface *intf = *it;
326  ++it;
327  AgentUveStats *uve = static_cast<AgentUveStats *>(agent_->uve());
329  uve->stats_manager()->GetInterfaceStats(intf);
330  if (s == NULL) {
331  continue;
332  }
333  AgentIfBandwidth phy_stat_entry;
334  phy_stat_entry.set_name(intf->name());
335  in_band = GetBandwidthUsage(s, true, mins, &in_util);
336  out_band = GetBandwidthUsage(s, false, mins, &out_util);
337  imp.insert(make_pair(intf->name(),in_band));
338  omp.insert(make_pair(intf->name(),out_band));
339  changed = true;
340  in_avg_util += in_util;
341  out_avg_util += out_util;
342  num_intfs++;
343  }
344  if (num_intfs) {
345  in_avg_util /= num_intfs;
346  out_avg_util /= num_intfs;
347  }
348  return changed;
349 }
350 
352  PhysicalInterfaceSet::const_iterator it = phy_intf_set_.begin();
353  while (it != phy_intf_set_.end()) {
354  const Interface *intf = *it;
355  AgentUveStats *uve = static_cast<AgentUveStats *>(agent_->uve());
357  uve->stats_manager()->GetInterfaceStats(intf);
358  if (s == NULL) {
359  continue;
360  }
361  s->prev_in_bytes = s->in_bytes;
363  s->prev_out_bytes = s->out_bytes;
365  ++it;
366  }
367 }
368 
369 void VrouterUveEntry::FetchDropStats(AgentDropStats &ds) const {
370  AgentUveStats *uve = static_cast<AgentUveStats *>(agent_->uve());
371  const vr_drop_stats_req &req = uve->stats_manager()->drop_stats();
372  uve->stats_manager()->BuildDropStats(req, ds);
373 }
374 
376  IFMapAgentParser *parser = agent_->cfg()->cfg_parser();
377  if (parser) {
378  ds->insert(AgentUve::DerivedStatsPair("node_update_parse_errors",
379  parser->node_update_parse_errors()));
380  ds->insert(AgentUve::DerivedStatsPair("link_update_parse_errors",
381  parser->link_update_parse_errors()));
382  ds->insert(AgentUve::DerivedStatsPair("node_delete_parse_errors",
383  parser->node_delete_parse_errors()));
384  ds->insert(AgentUve::DerivedStatsPair("link_delete_parse_errors",
385  parser->link_delete_parse_errors()));
386  }
387 }
388 
390  (std::map<std::string, AgentXmppStats> *xstats) const {
391  for (int count = 0; count < MAX_XMPP_SERVERS; count++) {
392  AgentXmppStats peer;
393  if (!agent_->controller_ifmap_xmpp_server(count).empty()) {
394  AgentXmppChannel *ch = agent_->controller_xmpp_channel(count);
395  if (ch == NULL) {
396  continue;
397  }
398  XmppChannel *xc = ch->GetXmppChannel();
399  if (xc == NULL) {
400  continue;
401  }
402  peer.set_reconnects(agent_->stats()->xmpp_reconnects(count));
403  peer.set_in_msgs(agent_->stats()->xmpp_in_msgs(count));
404  peer.set_out_msgs(agent_->stats()->xmpp_out_msgs(count));
405  xstats->insert(std::make_pair(
406  agent_->controller_ifmap_xmpp_server(count),
407  peer));
408  }
409  }
410 }
411 
412 bool VrouterUveEntry::SetVrouterPortBitmap(VrouterStatsAgent &vr_stats) {
413  bool changed = false;
414 
415  vector<uint32_t> tcp_sport;
416  if (port_bitmap_.tcp_sport_.Sync(tcp_sport)) {
417  vr_stats.set_tcp_sport_bitmap(tcp_sport);
418  changed = true;
419  }
420 
421  vector<uint32_t> tcp_dport;
422  if (port_bitmap_.tcp_dport_.Sync(tcp_dport)) {
423  vr_stats.set_tcp_dport_bitmap(tcp_dport);
424  changed = true;
425  }
426 
427  vector<uint32_t> udp_sport;
428  if (port_bitmap_.udp_sport_.Sync(udp_sport)) {
429  vr_stats.set_udp_sport_bitmap(udp_sport);
430  changed = true;
431  }
432 
433  vector<uint32_t> udp_dport;
434  if (port_bitmap_.udp_dport_.Sync(udp_dport)) {
435  vr_stats.set_udp_dport_bitmap(udp_dport);
436  changed = true;
437  }
438  return changed;
439 }
440 
441 void VrouterUveEntry::UpdateBitmap(uint8_t proto, uint16_t sport,
442  uint16_t dport) {
443  port_bitmap_.AddPort(proto, sport, dport);
444 }
445 
449 }
450 
452  RouteTableSizeMapPtr list) {
453  VrfEntry *vrf = static_cast<VrfEntry *>(entry);
454 
455  if (!vrf->IsDeleted()) {
456  RouteTableSize value;
457  value.set_inet4_unicast(vrf->GetInet4UnicastRouteTable()->Size());
458  value.set_inet4_multicast(vrf->GetInet4MulticastRouteTable()->Size());
459  value.set_evpn(vrf->GetEvpnRouteTable()->Size());
460  value.set_bridge(vrf->GetBridgeRouteTable()->Size());
461  value.set_inet6_unicast(vrf->GetInet6UnicastRouteTable()->Size());
462  list.get()->insert(RouteTableSizePair(vrf->GetName(), value));
463  }
464  return true;
465 }
466 
469  return false;
470  }
471 
473  DBTableWalker *walker = agent_->db()->GetWalker();
474  vrf_walk_id_ = walker->WalkTable(agent_->vrf_table(), NULL,
475  boost::bind(&VrouterUveEntry::AppendVrf, this, _1, _2, list),
476  boost::bind(&VrouterUveEntry::VrfWalkDone, this, _1, list));
477  return true;
478 }
479 
481  (const VrouterControlStats &uve) const {
482  VrouterControlStatsTrace::Send(uve);
483 }
484 
486  /* We do VRF walk to collect route table sizes. In Walk Done API we trigger
487  * building of all attributes of VrouterControlStats UVE and send it*/
488  StartVrfWalk();
489 }
490 
492  list) {
493  VrouterControlStats stats;
494  stats.set_name(agent_->agent_name());
495 
496  std::map<std::string, AgentXmppStats> xstats;
497  BuildXmppStatsList(&xstats);
498  stats.set_raw_xmpp_stats(xstats);
499 
500  AgentUve::DerivedStatsMap ifmap_stats;
501  FetchIFMapStats(&ifmap_stats);
502  stats.set_raw_ifmap_stats(ifmap_stats);
503 
504  stats.set_raw_rt_table_size(*(list.get()));
506 }
StatsManager * stats_manager() const
void FetchIFMapStats(AgentUve::DerivedStatsMap *ds) const
XmppChannel * GetXmppChannel()
Definition: vrf.h:86
FlowRateComputeInfo flow_info_
static const uint8_t bandwidth_mod_1min
uint64_t out_bytes() const
Definition: agent_stats.h:183
AgentRouteTable * GetInet4MulticastRouteTable() const
Definition: vrf.cc:326
AgentRouteTable * GetEvpnRouteTable() const
Definition: vrf.cc:330
IFMapAgentParser * cfg_parser() const
Definition: cfg_init.h:164
uint64_t GetBandwidthUsage(StatsManager::InterfaceStats *s, bool dir_in, int mins, double *util) const
uint64_t node_update_parse_errors()
AgentUveBase * uve() const
Definition: agent.cc:909
DB * db() const
Definition: agent.h:1118
void AddPort(uint8_t proto, uint16_t sport, uint16_t dport)
uint64_t node_delete_parse_errors()
PortBitmap udp_sport_
bool IsDeleted() const
Definition: db_entry.h:49
VrouterStatsAgent prev_stats_
vr_drop_stats_req drop_stats() const
AgentStats * stats() const
Definition: agent.cc:881
uint64_t flow_created() const
Definition: agent_stats.h:100
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable() const
Definition: vrf.cc:319
void UpdateBitmap(uint8_t proto, uint16_t sport, uint16_t dport)
uint64_t pkt_exceptions() const
Definition: agent_stats.h:129
const std::string & vhost_interface_name() const
Definition: agent.cc:104
void VrfWalkDone(DBTableBase *base, RouteTableSizeMapPtr list)
bool AppendVrf(DBTablePartBase *part, DBEntryBase *entry, RouteTableSizeMapPtr list)
virtual void DispatchVrouterStatsMsg(const VrouterStatsAgent &uve)
AgentDBEntry * FindActiveEntry(const DBEntry *key)
Definition: agent_db.cc:110
InterfaceTable * interface_table() const
Definition: agent.h:465
void BuildDropStats(const vr_drop_stats_req &r, AgentDropStats &ds) const
InetUnicastAgentRouteTable * GetInet6UnicastRouteTable() const
Definition: vrf.cc:338
const string & GetName() const
Definition: vrf.h:100
VrouterUveEntry(Agent *agent)
uint64_t CalculateBandwitdh(uint64_t bytes, int speed_mbps, int diff_seconds, double *utilization_bps) const
void DispatchVrouterControlStats(const VrouterControlStats &uve) const
std::map< string, uint64_t > DerivedStatsMap
Definition: agent_uve.h:18
std::pair< std::string, RouteTableSize > RouteTableSizePair
uint64_t flow_aged() const
Definition: agent_stats.h:107
uint64_t pkt_dropped() const
Definition: agent_stats.h:165
virtual bool SendVrouterMsg()
DBTableWalker * GetWalker()
Definition: db.h:48
virtual size_t Size() const
Definition: db_table.cc:507
DBTableWalker::WalkId vrf_walk_id_
Definition: agent.h:358
uint64_t link_delete_parse_errors()
PortBitmap udp_dport_
bool SetVrouterPortBitmap(VrouterStatsAgent &vr_stats)
std::pair< string, uint64_t > DerivedStatsPair
Definition: agent_uve.h:19
AgentRouteTable * GetBridgeRouteTable() const
Definition: vrf.cc:334
FlowCounters & added()
Definition: agent_stats.h:222
vr_drop_stats_req drop_stats
Definition: stats_manager.h:60
PortBitmap tcp_sport_
void BuildAndSendVrouterControlStats(RouteTableSizeMapPtr list)
static const uint8_t bandwidth_mod_5min
bool BuildPhysicalInterfaceBandwidth(std::vector< AgentIfBandwidth > &list, uint8_t mins) const
virtual ~VrouterUveEntry()
const std::string & agent_name() const
Definition: agent.h:878
bool BuildFlowRate(AgentStats::FlowCounters &created, AgentStats::FlowCounters &aged, FlowRateComputeInfo &flow_info, VrouterFlowRate &flow_rate) const
FlowProto * get_flow_proto() const
Definition: pkt_init.h:43
#define MAX_XMPP_SERVERS
Definition: agent.h:291
VrfTable * vrf_table() const
Definition: agent.h:485
WalkId WalkTable(DBTable *table, const DBRequestKey *key_start, WalkFn walker, WalkCompleteFn walk_complete, bool postpone_walk=false)
uint32_t FlowCount() const
Definition: flow_proto.cc:265
PortBitmap tcp_dport_
uint64_t out_pkts() const
Definition: agent_stats.h:180
FlowCounters & deleted()
Definition: agent_stats.h:223
static uint64_t UTCTimestampUsec()
Definition: time_util.h:13
boost::shared_ptr< RouteTableSizeMap > RouteTableSizeMapPtr
uint64_t in_bytes() const
Definition: agent_stats.h:177
bool Sync(std::vector< uint32_t > &bmap)
uint64_t link_update_parse_errors()
std::map< std::string, RouteTableSize > RouteTableSizeMap
const std::string & name() const
Definition: interface.h:114
static const WalkId kInvalidWalkerId
L4PortBitmap port_bitmap_
void FetchDropStats(AgentDropStats &ds) const
AgentConfig * cfg() const
Definition: agent.cc:865
PktModule * pkt() const
Definition: agent.cc:965
void BuildXmppStatsList(std::map< std::string, AgentXmppStats > *stats) const
void InitPrevStats() const
InterfaceStats * GetInterfaceStats(const Interface *intf)
bool BuildPhysicalInterfaceList(std::map< std::string, PhyIfStats > &list, std::map< std::string, PhyIfInfo > &info, std::map< std::string, AgentDropStats > &dsmap) const
PhysicalInterfaceSet phy_intf_set_
uint64_t in_pkts() const
Definition: agent_stats.h:174