From: Pierre Pfister Date: Fri, 15 Jul 2016 07:44:10 +0000 (+0100) Subject: tapcli: Use error counter for buffer allocation error X-Git-Tag: v16.09-rc1~137 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=ae6725b6fdf556470c3fb35db349c40becc15cce;p=vpp.git tapcli: Use error counter for buffer allocation error Change-Id: Ic51a0d17918de56869cfd4a371054fb380000089 Signed-off-by: Pierre Pfister --- 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 {