From nobody Sun Feb 25 01:18:05 2024 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 4Tj5Tp5vQdz5C0Rw for ; Sun, 25 Feb 2024 01:18:06 +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 4Tj5Tp1Mlbz4yRk for ; Sun, 25 Feb 2024 01:18:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708823886; a=rsa-sha256; cv=none; b=N0M/0Sa1l3wT/3hHm49j32I9IOK4dCg0krinpKH81E8xOJNb/iCL/huc39KFDYnJ+q7jLl KKSfm5i1QC0MGocal8CUtoI8u7AWpW72RJrAorP63Mj2gX+YR6LtU7T/JZJdgQNnd7ZSJE KaUtjMkonhDoMTCl+vh9Z/ssrxKhAlpziuOIzRZKC2L0oE/Utg5L+eg4HAUo7NOowXiG59 ySNiYlc/zVwjp9Znq5czwoARxcLLxACZAE2gXrd+EsRxaZbIDItJdaFCNpkvc9UknV6djR LuBx8LETe6sAwUX/4r7cSl4YPPxOH+KUh2+hSORtxbNKvTS1hnDe+WfZTTyNSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708823886; 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=V7GY5IFC/NLxyJB6vS4+TomN3yxnhLLGf6XyndCTgZI=; b=Yh7n/VuYt5raRHr/x0OqwvH06bM6kpDrwcHcY82l66t+6h4T5QO6ALBxjijIHJHp3Yb5+p Mwkk7E3BC9UUgqyXL0ub2SPUSLpewHgI9RAtezL5XLfIYYGBI68WjGiLkUAtjtLOny3BGR KCgU2bUF01nWMMnLsE2IZa+o4kPskDqxMh1vjjVzrazb/mJOq4r0fCUBEwyFNojBfO410P SWniFBaavDwEYo8+LWfRfzDoQ0Vzg2gJnJSiWbfq7iBXlDRMP7PyCgMi70ZfmCYGuaaC4h PKFp4NiaDXPtfq8RFUeqKKm65q9uZQwlQ0uldZCGYx+zLNXUZEidgM4r7TlA/Q== 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 4Tj5Tp0HkFzNLl for ; Sun, 25 Feb 2024 01:18:06 +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 41P1I5It014225 for ; Sun, 25 Feb 2024 01:18:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 41P1I5Pc014224 for net@FreeBSD.org; Sun, 25 Feb 2024 01:18:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 276890] Getting fq_codel correct on inbound shaping Date: Sun, 25 Feb 2024 01:18:05 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: dave.taht@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276890 --- Comment #5 from Dave Taht --- I am a little dubious about the "active" idea. http://fxr.watson.org/fxr/source/netpfil/ipfw/dn_sched_fq_codel.c#L413 Also. if (!si->flows[idx].active ) { 319 STAILQ_INSERT_TAIL(&si->newflows, &si->flows[idx], flowchain); 320 si->flows[idx].deficit =3D param->quantum; 321 si->flows[idx].cst.dropping =3D false; 322 si->flows[idx].cst.first_above_time =3D 0; 323 si->flows[idx].active =3D 1; 324 //D("activate %d",idx); 325 } In the linux version we do not touch the codel state variables at this phas= e at all, but retain the previous settings. It may be that dropping and first_above_time get set in roughly the same way in my version, but perhaps= if I describe the intent of what should happen, I too will understand this code better.=20 The idea of a flow going out of an "active" state is not that any of it=C2= =B4s state needs to be reset. The overall target of fq_codel is to reduce the total de= lay in all the queues to the target (usually 5ms). It maintains a cache of the = last "good" drop rate.=20 If a single flow, out of dozens, has an arrival rate like this: A A A A And that is still too much relative to the other flows, it needs to get more drops.=20 Anyway, instead of checking for or maintaining an active or inactive "state= " we just check to see if queue length > 0. Just saving my state here on this subtley. Also we use the global queue len= gth not the per queue length to turn off the global dropper, which I have to go looking through here to see if it is correct. --=20 You are receiving this mail because: You are the assignee for the bug.=