From nobody Tue Nov 23 18:06:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 62A211899D50; Tue, 23 Nov 2021 18:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzBsk0c8Pz4pdZ; Tue, 23 Nov 2021 18:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E95C21B307; Tue, 23 Nov 2021 18:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ANI6X7Y022355; Tue, 23 Nov 2021 18:06:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ANI6XKF022354; Tue, 23 Nov 2021 18:06:33 GMT (envelope-from git) Date: Tue, 23 Nov 2021 18:06:33 GMT Message-Id: <202111231806.1ANI6XKF022354@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 319e9fc642a1 - main - ng_bridge: count item allocation failures as memory failures List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 319e9fc642a13ac20e89d0bc05f8a09d1da5a502 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637690794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oBYHdV1mDNMHl9hjT+Dj4l0fdfHJfcvFlfARItgmm/c=; b=bG8x+Cj2B5IWFxPlaFR7A11QHPM49TvlD8Oy/fGyq/gxzlt7vDM43rzDP/UKCgIYK3V2k3 U5fQB6tCoFP5kq7IhNfzj1X513mwmxjdFl8UsHDTX/0Aj6CJvYYkkXQMM6XaYNEmy38ed9 Z3c5CImsfg9wqVhe0oD1FH1rClXRn6Ns5zdBIHukBzmqIVCacrf5HVYrk2hq3wWlGphW2N NQKJOVWClj0g2Nmf64miZvfwnXGzn2cUfI04jjJWWQMhmmxiC1Lnl4eUbKRMpKwnitSzMH Ow0W67guBZHPlAY82PaFq3Q7lPJfg1wv/+6yb3GlBucXjwhnMzIw8ILNbyMP4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637690794; a=rsa-sha256; cv=none; b=FH7eY9rVbn71CscczGAdsjZ5QrKJwnVdWRt2JbO52yzgfD9/as47sQo3Ll5wU+V8dyekEd 2T4lO0l6CBBT3GofIqcBpKuR2pKUL3f9p7/1lVbmto61jbW46+lQH6anldOVCy9kBoxfoD RF4jWp0arPKqpBPF++vioFukQqwdWhw1/6R6HOen8/hp7PM8JJ+AbIIfxaSULdgmqtR0Hl 4IMNMAx4zRJNYwnsnsD069XIRjQpEK2fZoKave/Z3meJXKj4Su7UQ1GTHtHt3pB/hiWqVf UhlHwCO9QZ8hZaOsE3Csha9kqd6vbJQotCS3H49WDlIKUTqk/O5MSABR1ordyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=319e9fc642a13ac20e89d0bc05f8a09d1da5a502 commit 319e9fc642a13ac20e89d0bc05f8a09d1da5a502 Author: Gleb Smirnoff AuthorDate: 2021-11-23 18:05:36 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-23 18:05:36 +0000 ng_bridge: count item allocation failures as memory failures Submitted by: Dmitry Luhtionov --- 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);