From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9E718F6C for ; Mon, 21 Jul 2025 14:55:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753109702; cv=none; b=QVDm1ZtIJ6wQ7hcj3ASSchEUgVFa38ULJwLRlkG3nxHb6jz77vm/s17oTOE+HFCII0uAS7At4tRH0MsHENMTdPTZP+7mrEbB4IGmKt2wVHh77c+ZCremxLsrd2DfhaaDeh9YL1nsGp0mnHL1j7RMPUn7dFFWUrP649/Bj/QM620= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753109702; c=relaxed/simple; bh=B5/SeSeHzxWetKPd+pOdRh7jpeM3SVOOiV/6Res8kr0=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OSL7EVY9/b8TguR2/vLHSqlXwLHCHBDFd/XqeuKmQ2eM5LGGTsl9lC57MjHWvB416TN4VBk8wEO23Yo0AdPCr1QKoUzS0gR+6y/oxTF5GANer05NFq9sjeiI6J52BnpUjQGSqMntvmFSZyRqQGIPFkj3Dz2HIEgrTjsR35Rq1X0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=Dg9KglOZ; arc=none smtp.client-ip=209.85.222.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="Dg9KglOZ" Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-7e334de8df9so497062785a.0 for ; Mon, 21 Jul 2025 07:55:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1753109699; x=1753714499; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=B5/SeSeHzxWetKPd+pOdRh7jpeM3SVOOiV/6Res8kr0=; b=Dg9KglOZPfUTf1flskOCnl4kMjadjJjQSMLrYkddT/t4xMVgp6hajhss+ZhMUkR5F1 yU5JDK/2B2LTq60zMR9SnWRf1wpVWQ1MXttuPrlGvUGDFNdZ7JNHeIwOfAUEM4UCqNjy dXO+aVgMuJlyEnz1eCrR9yrbzdoMgGZ0sDG8OqsHEI4wQEoGFJcOX/pQuIsuCqWH1qL/ cmLKwpQ2LTPK4+ADV2A6CZy48iCdqT6p4mFy84XYZWtIEc6iBvd3RaoJz5tkusFGb9Dp Tuy+0MGks2m21xpCx55ZDGGnaApuVHH/2cvU5a9yVajRwqvLp8vxN2RS7OyOgfpb576i Z4TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753109699; x=1753714499; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B5/SeSeHzxWetKPd+pOdRh7jpeM3SVOOiV/6Res8kr0=; b=NepmAGGP/YlGuRxYiww19mu1nQOZI6Uzm8Yv4+r9mnDruFXuWG3O0jU7Mq2SgqY6aK jp9k2qfsrraiI1KC5ZJfijYfLQNPM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:620a:618c:b0:7e3:3935:ec0c with SMTP id af79cd13be357-7e34356544bmr3015947885a.19.1753109699394; Mon, 21 Jul 2025 07:54:59 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7e356c3f872sm421999585a.53.2025.07.21.07.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jul 2025 07:54:59 -0700 (PDT) Date: Mon, 21 Jul 2025 07:54:56 -0700 From: Stephen Hemminger To: Jamal Hadi Salim Cc: Cong Wang , netdev@vger.kernel.org, will@willsroot.io Subject: Re: [Patch v4 net 0/6] netem: Fix skb duplication logic and prevent infinite loops Message-ID: <20250721075456.6cf6bf7c@hermes.local> In-Reply-To: References: <20250719220341.1615951-1-xiyou.wangcong@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 21 Jul 2025 10:00:30 -0400 Jamal Hadi Salim wrote: > On Sat, Jul 19, 2025 at 6:04=E2=80=AFPM Cong Wang wrote: > > > > This patchset fixes the infinite loops due to duplication in netem, the > > real root cause of this problem is enqueuing to the root qdisc, which is > > now changed to enqueuing to the same qdisc. This is more reasonable, > > more predictable from users' perspective, less error-proone and more el= egant. > > > > Please see more details in patch 1/6 which contains two pages of detail= ed > > explanation including why it is safe and better. > > > > This replaces the patches from William, with much less code and without > > any workaround. More importantly, this does not break any use case. > > =20 >=20 > Cong, you are changing user expected behavior. > So instead of sending to the root qdisc, you are looping on the same > qdisc. I dont recall what the history is for the decision to go back > to the root qdisc - but one reason that sounds sensible is we want to > iterate through the tree hierarchy again. Stephen may remember. > The fact that the qfq issue is hit indicates the change has > consequences - and given the check a few lines above, more than likely > you are affecting the qlen by what you did. >=20 > cheers, > jamal I don't remember why the original version re-queued to the root. But probably related to trying to keep proper semantics and accounting especially when doing rate limits.