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