From nobody Sun Mar 20 05:21:37 2022 X-Original-To: net@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 177A71A1D42D for ; Sun, 20 Mar 2022 05:21:38 +0000 (UTC) (envelope-from bugzilla-noreply@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 4KLmM519Mkz4WlS for ; Sun, 20 Mar 2022 05:21:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 E0675210DC for ; Sun, 20 Mar 2022 05:21:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 22K5Laf2019449 for ; Sun, 20 Mar 2022 05:21:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 22K5LafJ019448 for net@FreeBSD.org; Sun, 20 Mar 2022 05:21:36 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 262571] epair(4) interfaces stop forwarding traffic on moderate load Date: Sun, 20 Mar 2022 05:21:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647753697; 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: in-reply-to:in-reply-to:references:references; bh=vSk0DxEjjhTOwfJrpnX2SajSLOSfbkO0ynj/LyDybyw=; b=dgZ6Ofm2MvoV7hFgTjkHI2Gcs6HbyA5aLuA5cX1Zq3/FvetSKj53UaGS5J9ExF4q2fhc0G /O5jTqWCgSM/TPrEDunF63u0PXpHNFk54WTlQNDKECC32YgzULmMM/3bbPOVrsCKCyNTEM m9a2mEcXNqhwM/38yqkRAUnnbCH/B2o0fdo0SleIkFBAbPBQmucIiqcGIFK/gcxmx2D8Ee VCY+N0JlUpsgdEx+12fvYZ2G1Rl5K82Pxa+x+vGZNe77Y8i8zvoCHROTADbC8TMtjDK/8T fXvAsBRszcLpmDU3WKLXeDwTCH44qX1ujOlrFbUnbM5nlyKufTFffbRd0yH2JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647753697; a=rsa-sha256; cv=none; b=f5rh+NHhHXeTfmNqBgMWLmITD15rcEqB0T7in5dzQv1Ir78ikfE3NAqEaPY33Nurpbm7rn beZo0UbsofIVuMa1m64bwUJ1j56O4ZgKcVG/kxVu2fgYQvFhDSijk+OHIYD2wiqyUE7dbt WKTpET+cbovwa0UeHfMXLgdaFD+jvjTdFuZGFncOByFRM3jiJVP2g8huBw+3UE0TOIcos4 GY9EnKGZQjM6yTX+KQkupNH1R91J1uk8PZdUhVOt9Fvz8tQAzSbrLEhLIiLhgDN2nKOV7X IXy6cL8F3tv6JU10U1njniWownIOFc1OMHNXAh2qvkcoBoPdyZPjQPr9OlIOaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262571 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dfb3644ab2afe777fdd2539bc996a39044= 3f052f1 commit fb3644ab2afe777fdd2539bc996a390443f052f1 Author: Michael Gmelin AuthorDate: 2022-03-16 22:08:55 +0000 Commit: Kristof Provost CommitDate: 2022-03-20 00:24:51 +0000 if_epair: fix race condition on multi-core systems As an unwanted side effect of the performance improvements in 24f0bfbad57b9, epair interfaces stop forwarding traffic on higher load levels when running on multi-core systems. This happens due to a race condition in the logic that decides when to place work in the task queue(s) responsible for processing the content of ring buffers. In order to fix this, a field named state is added to the epair_queue structure. This field is used by the affected functions to signal each other that something happened in the underlying ring buffers that might require work to be scheduled in task queue(s), replacing the existing logic, which relied on checking if ring buffers are empty or not. epair_menq() does: - set BIT_MBUF_QUEUED - queue mbuf - if testandset BIT_QUEUE_TASK: enqueue task epair_tx_start_deferred() does: - swap ring buffers - process mbufs - clear BIT_QUEUE_TASK - if testandclear BIT_MBUF_QUEUED enqueue task PR: 262571 Reported by: Johan Hendriks MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D34569 (cherry picked from commit 66acf7685bcd8cf23b6c658a991637238a01859e) sys/net/if_epair.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=