From nobody Wed Mar 16 23:40:31 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 43B1C1A13E23 for ; Wed, 16 Mar 2022 23:40:32 +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 4KJmwv6yk9z4lBr for ; Wed, 16 Mar 2022 23:40:31 +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 9A8C91F641 for ; Wed, 16 Mar 2022 23:40:31 +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 22GNeVlD082089 for ; Wed, 16 Mar 2022 23:40:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 22GNeVTS082078 for net@FreeBSD.org; Wed, 16 Mar 2022 23:40:31 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: Wed, 16 Mar 2022 23:40:31 +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=1647474032; 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=7hB2yZ6FfqtNDyuCcDTmdwuxlKpTWZRetce6ZdXTHew=; b=fIQ0cuOsgmU07ueUd6FCiOYXd9OcaobXWoAEqPehvEh0lg7Uz07QdeSgCvAjMfFbMOZJ25 T3cMKAGW8nUt0G9vf+UE0r3Rm8ZLWnRsHaYzB1PGQQ/sjNON7Z7VXFavgVeLZzeqzDMoXv IQ6KaRRHhl8VB+4tkNbVh8ExCgt7c41jf6J9R/3oDZ61Pcnhia6veoL451RqXacThC7jVK 7ddS9rECGRXSZ5ozeZh9DB/pUIk8E3jZ3tChhh3FNMKeMsKuarP+OmrdaqMHS3igitMOMN Exz2WMuZxiAp/uRKE26ZT9VxYQY4z8dOOlmGDN4LqHbTtCzoeBE8b+25tx58Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647474032; a=rsa-sha256; cv=none; b=l8V+Mfg4KhWmD9jnWLef531gQDBo6o0D1zFLQU4Ktr7/1UYxotRQNWE92ERJmEImN4yejl B3lP6hgdJkl6i5yy5ptnDuKVYTEqt82Vb9DZw3Vd7AFlGczFuF1OS82FsB0MvcFUV9CInp PWvREfCfbSXAwIds8Cdl4M16L8aOENDuXyA8ypUkrYZWpIdghzIMaj9bNkkVelAAiV+Moe XHSp8LnEd3//jZZ/aJ5Z5fyBmn1p7q/Ql914u2ObOoSHuBsyEsUeumzZaz14+9L3IzVul5 ayWGW4UEr0p9s17mfLjtyJte7xZROwfFz7G2AsIoLCIaaFDu2StkIHF8PbOpFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262571 --- Comment #2 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dbb9ad300f029d57c84804702daa265254= 2a2535f commit bb9ad300f029d57c84804702daa2652542a2535f Author: Michael Gmelin AuthorDate: 2022-03-16 22:08:55 +0000 Commit: Kristof Provost CommitDate: 2022-03-16 23:38:33 +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 Approved by: re (gjb, early MFC) 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.=