diff options
author | Neale Ranns <nranns@cisco.com> | 2018-11-07 09:25:54 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-11-15 17:22:55 +0000 |
commit | 13a08cc0984496d50722ffb75e2f48c5d84fb9a7 (patch) | |
tree | ee1088dbe24d45ee725134ca5589acaf70ffc6d0 /src/plugins/gbp/gbp_recirc.c | |
parent | 96e2d4407b1538d8df4e277ba33b85876589e198 (diff) |
GBP: redirect contracts
Change-Id: I463b153de93cfec29a9c15e8e84e41f6003d4c5f
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_recirc.c')
-rw-r--r-- | src/plugins/gbp/gbp_recirc.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/gbp/gbp_recirc.c b/src/plugins/gbp/gbp_recirc.c index 57ba4083671..59588eafacd 100644 --- a/src/plugins/gbp/gbp_recirc.c +++ b/src/plugins/gbp/gbp_recirc.c @@ -66,11 +66,12 @@ gbp_recirc_add (u32 sw_if_index, epg_id_t epg_id, u8 is_ext) fib_protocol_t fproto; index_t ggi; - ggi = gbp_endpoint_group_find_and_lock (epg_id); + ggi = gbp_endpoint_group_find (epg_id); if (INDEX_INVALID == ggi) return (VNET_API_ERROR_NO_SUCH_ENTRY); + gbp_endpoint_group_lock (ggi); pool_get (gbp_recirc_pool, gr); clib_memset (gr, 0, sizeof (*gr)); gri = gr - gbp_recirc_pool; @@ -119,10 +120,12 @@ gbp_recirc_add (u32 sw_if_index, epg_id_t epg_id, u8 is_ext) mac_address_from_bytes (&mac, vnet_sw_interface_get_hw_address (vnet_get_main (), gr->gr_sw_if_index)); - gbp_endpoint_update (gr->gr_sw_if_index, - NULL, &mac, gr->gr_epg, - GBP_ENDPOINT_FLAG_NONE, - NULL, NULL, &gr->gr_ep); + gbp_endpoint_update_and_lock (GBP_ENDPOINT_SRC_CP, + gr->gr_sw_if_index, + NULL, &mac, INDEX_INVALID, + INDEX_INVALID, gr->gr_epg, + GBP_ENDPOINT_FLAG_NONE, + NULL, NULL, &gr->gr_ep); vnet_feature_enable_disable ("ip4-unicast", "ip4-gbp-src-classify", gr->gr_sw_if_index, 1, 0, 0); @@ -172,7 +175,7 @@ gbp_recirc_delete (u32 sw_if_index) if (gr->gr_is_ext) { - gbp_endpoint_delete (gr->gr_ep); + gbp_endpoint_unlock (GBP_ENDPOINT_SRC_CP, gr->gr_ep); vnet_feature_enable_disable ("ip4-unicast", "ip4-gbp-src-classify", gr->gr_sw_if_index, 0, 0, 0); |