Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4753043rwd; Tue, 23 May 2023 12:00:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZYiKPwKzV/GzQsGLwteCPQppOZqW6bNhX1wwAaVsVVdtjqJxTMl1xx7DgLAGXcN7Kexns X-Received: by 2002:a05:6a20:428a:b0:10b:cdb1:3563 with SMTP id o10-20020a056a20428a00b0010bcdb13563mr7970247pzj.46.1684868418918; Tue, 23 May 2023 12:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684868418; cv=none; d=google.com; s=arc-20160816; b=LKNMqNQ/RkoE5c4J+QmWfKppba/DWIP5sjbvznEGq16awMvVFDs260PjGdsiRJyk9b ODywokIKAQLvMFD31xvaQqyG+Wb289ZYJx3BJXWwcgonbM+vmgmBgTOf5rmLs/WQovUd t6wv6VCceKvbdadhdYjUGPWU65wc7vuq5DJ1ojVWGGnPNL7mfWK9YkZVB97as67I6tP0 WtLBEiNObj6MhZGEHXIEFewiUv32CJheCEtpq+qFBg6Dq0dLW2zwLDgpRCX3IU8713rb 6pNeyc2NCBr7LriHTp3CoQr+lqjmfhLBMeGkHrCaNMblLB04OJ3+sf0ee0GXL1elme37 Kisw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rWn2MIKjUVOy+G+HIOvINhREydSAiCGuFlv2fGYs64o=; b=dVucyL4D7VK02axYZql3k2k+LzKfgOecRfxWRiyAgMkt1zhZTDmwWiHkLSxXWzuh8l LVfuXSrTYxp/EWaMcS/m+rnZSoGbKzIhx1Yw89FI78m2h/aqJH3J8WUdyOwUchg8oOAw UurXdkL5X366ZIADvKxNNdLlSfEJckxoJPkMJ0P4ZKm2I3TI2gvYpUSoyDhDxeHPJoYJ spYXMLZSByvhoNoq/AE0bKKslhoFoLGWa+bOaNcF0Nd+EpRx5o48ua9ANfwFhW5v1eMf 7FH0bne3jwOTM4UfvivjgO3kFLbu2eHduE8iauBpXyITQ0zn4UgGV5F7YLd87TQdjq59 b7Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=AHu218kD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a632c02000000b005288509b88asi3212043pgs.681.2023.05.23.12.00.04; Tue, 23 May 2023 12:00:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=AHu218kD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232824AbjEWSxA (ORCPT + 99 others); Tue, 23 May 2023 14:53:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjEWSw7 (ORCPT ); Tue, 23 May 2023 14:52:59 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A138191; Tue, 23 May 2023 11:52:57 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-62382e86f81so32748066d6.2; Tue, 23 May 2023 11:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684867976; x=1687459976; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=rWn2MIKjUVOy+G+HIOvINhREydSAiCGuFlv2fGYs64o=; b=AHu218kDLLmj5B9inD98p0ijdWxsVzotJoiFBu7VYMbOBxwClSKDrm9NIa+Gf/7Yb3 M9eyEnLGkUac6u+bNwVOFN3szjB9xDIWkdVnwR4+ETtvBp3JkBhn/xV59A3QdlfZeulA gJnoNuum4Nn12d+oF5/+XZDnpuwv5CAc2KtPxI+VxUnrhfxO7qKMuy8RKc7/XAHi3rXd Pp2ysJftfHMjKaNUFUWlIP66u6tR9/L4iTD7+t06d+Y3Uxhcs53t29mWItjTZJiI08eP VAqAHPc0967s5GmblTQfSvu+vWiingIRBNQEWJ/FS2/z/r1UDfJbmwcxKKM0xkTzE2Os URsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684867976; x=1687459976; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rWn2MIKjUVOy+G+HIOvINhREydSAiCGuFlv2fGYs64o=; b=e2GMAK3G7LmzldEwUH52F3XASF64KO35wNJ9oU2M0gVI7hy40D/0kpiiZzz0UJNL6m 1uY4d5jTansoNjohvQhmpti2pP2Fgh64xR7SscoTeYwUAP7Lprt7L7IHVR2pIfoa52ir T+/6WRuEamNLrMHZ3VnLdNS0dJCXfhlHZghw7hAxJ+ZGF7q4eNxSCqwD5Y9R0SfPpuwn vZEGJGSG9wclBjMtzGmULGoZLIAJtSiVHIwfu/S8APedC75wemldfg6oaO2joPg+DpKE /lFzdqnRVS3fGFcyqA8AiEGOB1QVhEjCBZhh753Vzeb1ThxMNwwjLlKaOk7fi6Gvj6un DHBA== X-Gm-Message-State: AC+VfDyuCD78HH9hEu71WPyBxr4WKUeNzbbaeESavhc2X9lXxSyVeJVU Gv7dhK5siz2jo1vYV9eIhA== X-Received: by 2002:a05:6214:410d:b0:619:ff0c:9246 with SMTP id kc13-20020a056214410d00b00619ff0c9246mr8059323qvb.34.1684867976633; Tue, 23 May 2023 11:52:56 -0700 (PDT) Received: from C02FL77VMD6R.googleapis.com ([2600:1700:d860:12b0:c32:b55:eaec:a556]) by smtp.gmail.com with ESMTPSA id mm19-20020a0562145e9300b00623927281c2sm2974588qvb.40.2023.05.23.11.52.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 11:52:56 -0700 (PDT) Date: Tue, 23 May 2023 11:52:48 -0700 From: Peilin Ye To: Vlad Buslov Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Peilin Ye , Daniel Borkmann , John Fastabend , Vlad Buslov , Pedro Tammela , Hillf Danton , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Cong Wang Subject: Re: [PATCH v2 net 6/6] net/sched: qdisc_destroy() old ingress and clsact Qdiscs before grafting Message-ID: References: <8e3383d0bacd084f0e33d9158d24bd411f1bf6ba.1684796705.git.peilin.ye@bytedance.com> <87sfbnxhg7.fsf@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sfbnxhg7.fsf@nvidia.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vlad, On Tue, May 23, 2023 at 05:04:40PM +0300, Vlad Buslov wrote: > > @@ -1458,6 +1472,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, > > struct Qdisc *p = NULL; > > int err; > > > > +replay: > > Perhaps also set q and p to NULL here? Even though on cursory look you > should get the same lookup result since the function is called under > rtnl_lock, tc_modify_qdisc() does this on replay ("Reinit, just in case > something touches this.") and tc_new_tfilter() got some non-obvious bugs > after I introduced replay there without re-setting some of the required > variables. Sure, I'll reinitialize tcm, q and p after "replay:" in next version, just like tc_modify_qdisc(). Thanks for the suggestion! Peilin Ye