Skip to content

Commit

Permalink
Sync Agent dropstats with that of vrouter.
Browse files Browse the repository at this point in the history
Removed invalid fields from agent and added missing fields.

Partial-BUG: #1579828
(cherry picked from commit 14f993d)

Change-Id: Ic236923c8c33630216f755539b34864bce7f85df
  • Loading branch information
ashoksr committed May 26, 2016
1 parent 722c68c commit 140a22c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
6 changes: 5 additions & 1 deletion src/vnsw/agent/kstate/kstate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ void KState::DropStatsMsgHandler(vr_drop_stats_req *req) {
resp->set_ds_discard(req->get_vds_discard());
resp->set_ds_pull(req->get_vds_pull());
resp->set_ds_invalid_if(req->get_vds_invalid_if());
//resp->set_ds_arp_not_me(req->get_vds_arp_not_me());
resp->set_ds_garp_from_vm(req->get_vds_garp_from_vm());
resp->set_ds_invalid_arp(req->get_vds_invalid_arp());
resp->set_ds_trap_no_if(req->get_vds_trap_no_if());
Expand Down Expand Up @@ -384,5 +383,10 @@ void KState::DropStatsMsgHandler(vr_drop_stats_req *req) {
resp->set_ds_cloned_original(req->get_vds_cloned_original());
resp->set_ds_invalid_vnid(req->get_vds_invalid_vnid());
resp->set_ds_frag_err(req->get_vds_frag_err());
resp->set_ds_invalid_source(req->get_vds_invalid_source());
resp->set_ds_mcast_df_bit(req->get_vds_mcast_df_bit());
resp->set_ds_arp_no_where_to_go(req->get_vds_arp_no_where_to_go());
resp->set_ds_arp_no_route(req->get_vds_arp_no_route());
resp->set_ds_l2_no_route(req->get_vds_l2_no_route());
}

6 changes: 5 additions & 1 deletion src/vnsw/agent/kstate/kstate.sandesh
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ response sandesh KDropStatsResp {
2: u64 ds_discard;
3: u64 ds_pull;
4: u64 ds_invalid_if;
5: u64 ds_arp_not_me;
6: u64 ds_garp_from_vm;
7: u64 ds_invalid_arp;
8: u64 ds_trap_no_if;
Expand Down Expand Up @@ -254,4 +253,9 @@ response sandesh KDropStatsResp {
40: u64 ds_cloned_original;
41: u64 ds_invalid_vnid;
42: u64 ds_frag_err;
43: u64 ds_invalid_source;
44: u64 ds_mcast_df_bit;
45: u64 ds_arp_no_where_to_go;
46: u64 ds_arp_no_route;
47: u64 ds_l2_no_route;
}
18 changes: 12 additions & 6 deletions src/vnsw/agent/uve/test/test_vrouter_uve.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ class UveVrouterUveTest : public ::testing::Test {
if (d1.get_ds_invalid_if() != (uint64_t)d2.get_vds_invalid_if()) {
return false;
}
//if (d1.get_ds_arp_not_me() != (uint64_t)d2.get_vds_arp_not_me()) {
// return false;
//}
if (d1.get_ds_garp_from_vm() != (uint64_t)d2.get_vds_garp_from_vm()) {
return false;
}
Expand Down Expand Up @@ -239,9 +236,6 @@ class UveVrouterUveTest : public ::testing::Test {
if (d1.get_ds_mcast_clone_fail() != (uint64_t)d2.get_vds_mcast_clone_fail()) {
return false;
}
if (d1.get_ds_composite_invalid_interface() != (uint64_t)d2.get_vds_composite_invalid_interface()) {
return false;
}
if (d1.get_ds_rewrite_fail() != (uint64_t)d2.get_vds_rewrite_fail()) {
return false;
}
Expand Down Expand Up @@ -269,6 +263,18 @@ class UveVrouterUveTest : public ::testing::Test {
if (d1.get_ds_frag_err() != (uint64_t)d2.get_vds_frag_err()) {
return false;
}
if (d1.get_ds_invalid_source() != (uint64_t)d2.get_vds_invalid_source()) {
return false;
}
if (d1.get_ds_mcast_df_bit() != (uint64_t)d2.get_vds_mcast_df_bit()) {
return false;
}
if (d1.get_ds_arp_no_route() != (uint64_t)d2.get_vds_arp_no_route()) {
return false;
}
if (d1.get_ds_l2_no_route() != (uint64_t)d2.get_vds_l2_no_route()) {
return false;
}
return true;
}
TestUveUtil util_;
Expand Down
4 changes: 2 additions & 2 deletions src/vnsw/agent/uve/vrouter.sandesh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ struct AgentDropStats {
1: u64 ds_discard;
2: u64 ds_pull;
3: u64 ds_invalid_if;
4: u64 ds_arp_not_me;
5: u64 ds_garp_from_vm;
6: u64 ds_invalid_arp;
7: u64 ds_trap_no_if;
Expand Down Expand Up @@ -131,7 +130,6 @@ struct AgentDropStats {
29: u64 ds_pcow_fail;
30: u64 ds_flood;
31: u64 ds_mcast_clone_fail;
32: u64 ds_composite_invalid_interface;
33: u64 ds_rewrite_fail;
34: u64 ds_misc;
35: u64 ds_invalid_packet;
Expand All @@ -143,6 +141,8 @@ struct AgentDropStats {
41: u64 ds_frag_err;
42: u64 ds_invalid_source;
43: u64 ds_mcast_df_bit;
44: u64 ds_arp_no_route;
45: u64 ds_l2_no_route;
}

struct AgentXmppStats {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ AgentDropStats AgentStatsSandeshContext::GetDropStats(vr_drop_stats_req *req) {
ds.ds_pcow_fail = req->get_vds_pcow_fail();
ds.ds_flood = req->get_vds_flood();
ds.ds_mcast_clone_fail = req->get_vds_mcast_clone_fail();
ds.ds_composite_invalid_interface = req->get_vds_composite_invalid_interface();
ds.ds_rewrite_fail = req->get_vds_rewrite_fail();
ds.ds_misc = req->get_vds_misc();
ds.ds_invalid_packet = req->get_vds_invalid_packet();
Expand All @@ -195,6 +194,8 @@ AgentDropStats AgentStatsSandeshContext::GetDropStats(vr_drop_stats_req *req) {

ds.ds_invalid_source = req->get_vds_invalid_source();
ds.ds_mcast_df_bit = req->get_vds_mcast_df_bit();
ds.ds_arp_no_route = req->get_vds_arp_no_route();
ds.ds_l2_no_route = req->get_vds_l2_no_route();
return ds;
}

0 comments on commit 140a22c

Please sign in to comment.