diff options
author | Neale Ranns <nranns@cisco.com> | 2019-04-04 00:35:37 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-04-04 10:27:26 +0000 |
commit | 1aa35576ec00ba2acc103c444cd8598d7d3b5dbd (patch) | |
tree | 5b9dee0044f2c67fb7275d8de278649bf940a3b3 /src/plugins/gbp/gbp_api.c | |
parent | 070fd4b046265e7aabe3f9e226e769441db18d79 (diff) |
GBP: Counters per-contract
Change-Id: I28bb9e3d3ea3a99a9e24801ef5241a0099186108
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_api.c')
-rw-r--r-- | src/plugins/gbp/gbp_api.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/gbp/gbp_api.c b/src/plugins/gbp/gbp_api.c index 76f0b218a19..f6d25dd81a6 100644 --- a/src/plugins/gbp/gbp_api.c +++ b/src/plugins/gbp/gbp_api.c @@ -325,12 +325,7 @@ gbp_bridge_domain_flags_from_api (vl_api_gbp_bridge_domain_flags_t a) if (a & GBP_BD_API_FLAG_DO_NOT_LEARN) g |= GBP_BD_FLAG_DO_NOT_LEARN; - if (a & GBP_BD_API_FLAG_UU_FWD_DROP) - g |= GBP_BD_FLAG_UU_FWD_DROP; - if (a & GBP_BD_API_FLAG_MCAST_DROP) - g |= GBP_BD_FLAG_MCAST_DROP; - if (a & GBP_BD_API_FLAG_UCAST_ARP) - g |= GBP_BD_FLAG_UCAST_ARP; + return (g); } @@ -934,6 +929,7 @@ vl_api_gbp_contract_add_del_t_handler (vl_api_gbp_contract_add_del_t * mp) { vl_api_gbp_contract_add_del_reply_t *rmp; u16 *allowed_ethertypes; + u32 stats_index; index_t *rules; int ii, rv = 0; u8 n_et; @@ -962,14 +958,19 @@ vl_api_gbp_contract_add_del_t_handler (vl_api_gbp_contract_add_del_t * mp) rv = gbp_contract_update (ntohs (mp->contract.sclass), ntohs (mp->contract.dclass), ntohl (mp->contract.acl_index), - rules, allowed_ethertypes); + rules, allowed_ethertypes, &stats_index); } else rv = gbp_contract_delete (ntohs (mp->contract.sclass), ntohs (mp->contract.dclass)); out: - REPLY_MACRO (VL_API_GBP_CONTRACT_ADD_DEL_REPLY + GBP_MSG_BASE); + /* *INDENT-OFF* */ + REPLY_MACRO2 (VL_API_GBP_CONTRACT_ADD_DEL_REPLY + GBP_MSG_BASE, + ({ + rmp->stats_index = htonl (stats_index); + })); + /* *INDENT-ON* */ } static int |