diff options
author | Pierre Pfister <ppfister@cisco.com> | 2016-07-15 08:44:10 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-07-21 09:35:58 +0000 |
commit | ae6725b6fdf556470c3fb35db349c40becc15cce (patch) | |
tree | 52830089b206eb4c706e6783efa146f824f5e427 | |
parent | 9387e51acbbcb676222740f26b98973430ab28e1 (diff) |
tapcli: Use error counter for buffer allocation error
Change-Id: Ic51a0d17918de56869cfd4a371054fb380000089
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
-rw-r--r-- | vnet/vnet/unix/tapcli.c | 4 | ||||
-rw-r--r-- | vnet/vnet/unix/tapcli.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/vnet/vnet/unix/tapcli.c b/vnet/vnet/unix/tapcli.c index c1548fd1a29..667e3e412de 100644 --- a/vnet/vnet/unix/tapcli.c +++ b/vnet/vnet/unix/tapcli.c @@ -249,7 +249,9 @@ static uword tapcli_rx_iface(vlib_main_t * vm, vlib_buffer_alloc_from_free_list(vm, &tm->rx_buffers[len], VLIB_FRAME_SIZE - len, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX); if (PREDICT_FALSE(vec_len(tm->rx_buffers) < tm->mtu_buffers)) { - clib_warning("vlib_buffer_alloc failed"); + vlib_node_increment_counter(vm, tapcli_rx_node.index, + TAPCLI_ERROR_BUFFER_ALLOC, + tm->mtu_buffers - vec_len(tm->rx_buffers)); break; } } diff --git a/vnet/vnet/unix/tapcli.h b/vnet/vnet/unix/tapcli.h index 76580bf85d5..e9228d7cb0e 100644 --- a/vnet/vnet/unix/tapcli.h +++ b/vnet/vnet/unix/tapcli.h @@ -22,6 +22,7 @@ /* Must be first. */ \ _(NONE, "no error") \ _(READ, "read error") \ + _(BUFFER_ALLOC, "buffer allocation error") \ _(UNKNOWN, "unknown error") typedef enum { |