From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC22AC7EE23 for ; Tue, 23 May 2023 18:53:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234899AbjEWSxB (ORCPT ); Tue, 23 May 2023 14:53:01 -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-Google-Smtp-Source: ACHHUZ41XhXT0087V4u7c4h9ZtuUk0wwdyR0WPz5F5FFh5ElEJXfHBqz4o9qAwjwBelPkWBPo7ftXA== 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> 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