summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnet/vnet/unix/tapcli.c4
-rw-r--r--vnet/vnet/unix/tapcli.h1
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 {