From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail.toke.dk; spf=pass smtp.mailfrom=asu.edu; dkim=pass header.d=asu.edu; arc=none (Message is not ARC signed); dmarc=none Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by mail.toke.dk (Postfix) with ESMTPS id F3F729DB727 for ; Fri, 28 Nov 2025 19:49:36 +0100 (CET) Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-8b2d56eaaceso207975585a.0 for ; Fri, 28 Nov 2025 10:49:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asu.edu; s=google; t=1764355773; x=1764960573; darn=lists.bufferbloat.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VznajH2pBXEOBwf6S0r4CgidMsgXR3tvOfvsfM5bKGI=; b=tZcgh3j7AQaLvfe9RhPXq/9E9tvNdz3CXT0bGl1h0GRAf271TAggA0xRNnM9pIcR08 VLtHp2pvaTcrqNGqCH1ohHmLONYAu9KdMgo5m1oeUXrXtY0c9sasRHKyh5UIN0VzIJOC kGQq83OhmowujfuYgjn3cD+lK6akIkGGHS4vXxUBsBnH+4WKFAtUHAv7Lr2rRH1FvvCw Ke7LCE8g0S7cAWoggyKfLjmiIPB4FhgHU3oqRJTqmbWrLOAy5DAPk0F0BSRB5MPJ21OA M/H8fLO+1NNEojSu5nYu32JXSd9Cknn2UqfM2yYFMmKb/r041WZfYPnWTHlPJO0B43EI 7kBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764355773; x=1764960573; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=VznajH2pBXEOBwf6S0r4CgidMsgXR3tvOfvsfM5bKGI=; b=rXgXfenVGhZqS2LW7b1AKHp8O9eFNcdZqfI00ir0c7mPWliLiEubq0GxVUjA6u6ygc 0d40RAUNbJHq3V9WPPiWfmcxdOxxxvo3qLvhaA2wzP/ykEdItAs8wCRr2em4blk00U3y DfbbD4ddSgQCYySL3EKTywONz8t0ZujRa0i7mKOKnwBcvx3KFqQKYGGV0TivIqr8vDtw pDoEtI0vYVIwcsaCpSE47RRSpnDYSztviQv04C7A5XCE0ePoj63b8Hsz/2I+fNPpgyts yRGn/krKMY6dFyFsVWcy7pk6c7EjK4uMbaky5VFsjt/Is1ItN0noSrxz4LjL17thwPl3 MjvA== X-Forwarded-Encrypted: i=1; AJvYcCX2EW0Pxdj2fnucw7A221aU/wv8xxh1SkGV+1VxG43JCYFQQpryDZ/QXG7ehL6+CgpwyQKk@lists.bufferbloat.net X-Gm-Message-State: AOJu0YxTZAm5SNsmjOZNy49e0Usw/da70HPiBSaN7wA+imcHCCJG4wAm Ij07mFqkePZ0m0ef+xE55uFu81tKfuq5v9PyAm8X/Wa0vRV1zg98goLhU8313FlvPQl/+L7gH8H kHLTklkrsTvNKLT/2LfBou+wKZlyuFHcgunvJKQzV X-Gm-Gg: ASbGncsSz5Cn7hbpo+2saEmvvie7Gw7YGDgSRmLXqnw+nlX/BxtqqBVpgbQdwYdPAMB DDJK7782xDOvUOwM0+HVlLUmu2nK+C71iBHv1Ki8zDTTk2C1TrAhQur3QhRkzdXz37WTMAbwjhB lfk+0TN3JYPRDRQEo1eqhJPjT6VCvRlUSfUKcSUXepMpusHx3py6XFakOiAc3ITpIL53EvQXOzY sCEXzYgM/jJZ3/iaa6MCl9eXEijmtys4pRt66U82e5iGr6DGBE2KWa32rpNXjVE7sgUeBPw X-Google-Smtp-Source: AGHT+IFjRM/6UPV7aI9MptxB6wVmvfk+0t+vYvB6qc3V2el4sHpZfuef0Mb9rT0DSWYVUSkWvMK3q3g4bKKlBIkAe9w= X-Received: by 2002:a05:620a:29c7:b0:8b2:dcde:b668 with SMTP id af79cd13be357-8b33d4680a5mr3966542085a.62.1764355773575; Fri, 28 Nov 2025 10:49:33 -0800 (PST) MIME-Version: 1.0 References: <20251128001415.377823-1-xmei5@asu.edu> <87ikeubjqu.fsf@toke.dk> In-Reply-To: <87ikeubjqu.fsf@toke.dk> From: Xiang Mei Date: Fri, 28 Nov 2025 11:49:21 -0700 X-Gm-Features: AWmQ_blicLCsN0iOkNUduAiLI6to9ue0rAibm96LtZjDLhZZqQLeIAnsmPbo0Qc Message-ID: To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: security@kernel.org, netdev@vger.kernel.org, xiyou.wangcong@gmail.com, cake@lists.bufferbloat.net, bestswngs@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-MailFrom: xmei5@asu.edu X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation Message-ID-Hash: CITVZWQZYR4PB5G25PISDA5HGUVNES3L X-Message-ID-Hash: CITVZWQZYR4PB5G25PISDA5HGUVNES3L X-Mailman-Approved-At: Fri, 28 Nov 2025 23:39:16 +0100 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Cake] Re: [PATCH net v8 1/2] net/sched: sch_cake: Fix incorrect qlen reduction in cake_drop List-Id: Cake - FQ_codel the next generation Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Thanks for the tip. I=E2=80=99ll retain the existing tags. On Fri, Nov 28, 2025 at 2:16=E2=80=AFAM Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > Xiang Mei writes: > > > In cake_drop(), qdisc_tree_reduce_backlog() is used to update the qlen > > and backlog of the qdisc hierarchy. Its caller, cake_enqueue(), assumes > > that the parent qdisc will enqueue the current packet. However, this > > assumption breaks when cake_enqueue() returns NET_XMIT_CN: the parent > > qdisc stops enqueuing current packet, leaving the tree qlen/backlog > > accounting inconsistent. This mismatch can lead to a NULL dereference > > (e.g., when the parent Qdisc is qfq_qdisc). > > > > This patch computes the qlen/backlog delta in a more robust way by > > observing the difference before and after the series of cake_drop() > > calls, and then compensates the qdisc tree accounting if cake_enqueue() > > returns NET_XMIT_CN. > > > > To ensure correct compensation when ACK thinning is enabled, a new > > variable is introduced to keep qlen unchanged. > > > > Fixes: 15de71d06a40 ("net/sched: Make cake_enqueue return NET_XMIT_CN w= hen past buffer_limit") > > Signed-off-by: Xiang Mei > > Please retain tags when reposting... > > Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen