git: 319e9fc642a1 - main - ng_bridge: count item allocation failures as memory failures
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 Nov 2021 18:06:33 UTC
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=319e9fc642a13ac20e89d0bc05f8a09d1da5a502 commit 319e9fc642a13ac20e89d0bc05f8a09d1da5a502 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2021-11-23 18:05:36 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2021-11-23 18:05:36 +0000 ng_bridge: count item allocation failures as memory failures Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com> --- sys/netgraph/ng_bridge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c index 12cc619241b6..9f1d33ba4c85 100644 --- a/sys/netgraph/ng_bridge.c +++ b/sys/netgraph/ng_bridge.c @@ -695,6 +695,8 @@ ng_bridge_send_data(link_cp dst, int manycast, struct mbuf *m, item_p item) { NG_SEND_DATA_ONLY(error, dst->hook, m); if (error) { + if (error == ENOMEM) + counter_u64_add(dst->stats.memoryFailures, 1); /* The packet is still ours */ if (item != NULL) NG_FREE_ITEM(item);