diff options
author | Matthew Smith <mgsmith@netgate.com> | 2019-05-09 08:55:11 -0500 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-05-14 15:56:44 +0000 |
commit | 5e8e8dcd71c619b098093e124ccde89ba3590e6f (patch) | |
tree | 44f6ba82fc29594047888bbb81d61e7760b0e8b8 /src/plugins/dpdk/ipsec | |
parent | 49c1bc845d0bc77542982f85cc64f57e2b5b70f6 (diff) |
IPsec: increment tunnel intf tx counters
Recent changes removed the function that was incrementing the
tx counters. Increment them in the esp_encrypt functions.
Change-Id: I446333a23ccf66e34893adb2aa49af562cf35507
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'src/plugins/dpdk/ipsec')
-rw-r--r-- | src/plugins/dpdk/ipsec/esp_encrypt.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/dpdk/ipsec/esp_encrypt.c b/src/plugins/dpdk/ipsec/esp_encrypt.c index 45a6257f7e8..2ff7e41c513 100644 --- a/src/plugins/dpdk/ipsec/esp_encrypt.c +++ b/src/plugins/dpdk/ipsec/esp_encrypt.c @@ -114,6 +114,8 @@ dpdk_esp_encrypt_inline (vlib_main_t * vm, { u32 n_left_from, *from, *to_next, next_index, thread_index; ipsec_main_t *im = &ipsec_main; + vnet_main_t *vnm = im->vnet_main; + vnet_interface_main_t *vim = &vnm->interface_main; u32 thread_idx = vlib_get_thread_index (); dpdk_crypto_main_t *dcm = &dpdk_crypto_main; crypto_resource_t *res = 0; @@ -304,6 +306,13 @@ dpdk_esp_encrypt_inline (vlib_main_t * vm, (&ipsec_sa_counters, thread_index, sa_index0, 1, b0->current_length); + /* Update tunnel interface tx counters */ + if (is_tun) + vlib_increment_combined_counter + (vim->combined_sw_if_counters + VNET_INTERFACE_COUNTER_TX, + thread_index, vnet_buffer (b0)->sw_if_index[VLIB_TX], + 1, b0->current_length); + res->ops[res->n_ops] = op; res->bi[res->n_ops] = bi0; res->n_ops += 1; |