Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1346084rwd; Tue, 16 May 2023 16:04:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ68UcRHQVF+sFOHW5fCf+4xeRjLDx9v09+OCE+heRSLS82TZvB6gS3yblxyCJzBCKcy9gOZ X-Received: by 2002:a17:902:c945:b0:1a9:546c:1593 with SMTP id i5-20020a170902c94500b001a9546c1593mr49985143pla.14.1684278245979; Tue, 16 May 2023 16:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684278245; cv=none; d=google.com; s=arc-20160816; b=VJfV83NRXCrBMczLe3MCFtigj0sQkMBPa+Oh9Qh2v8xeTMiPXm1cUAob+SmtC192Q2 DFclhGOI0naZ5tX3Jqk26ejsyja7zdWwPLtOfol8pXig9vGkCS6oHtkYaa7htgoQqaVa oT0AZpFbgq0YfgpK+X09ADfraONuyn1ClmCLwkcGokTVaHXA8qq/QV8SawJaM72EhQIm nPC7ztQnLSKO93tyLp7AcavnVCYImmDhYXPA9h2czLcLVP1Eid5l3mn2ssSWio0xA7P0 D+KEuFZunHQmRpaMmXoPGwGDV6ffJCp5zJ9oDTGTASVRhiLJ4+oC0aHEnBpTFXvxXv+D BVcQ== 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=obGFfPSstGK57Wl5NPoD/AZ7KNFXNho09WEyyfqv2LU=; b=PjnJzs+ujmyP5uBOsibXzmAfq95i0H29jTmjboKQt33mTwJK9nC06USVaIomurF6NZ y1PAFWV6TUihKWsbm6u4vdhdLQpGpIMSqlk7vkp+uQqhaz8csrgWW3WqbM2VSnwHLBky HF6XsnTu+yv1lQlAjM+izQCK/dJMghLmk+qzItrYfoFWPcBaYOMXl3Ziq5tzLHVR9H27 bzWpCw+e7AX9R+JDdpgleRIIhE6Ik/FOohubrT0MyyjK9zcCLNpB8DbGiVCOAAgtQUCD sDO1Uf5kd3AvsmrjGEzyw9art2Gc54Hx8B8uCMv5smHbNqIGtFwzYA8fkoSpSEyi4BBg bbFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ZREduQEl; 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 f15-20020a170902684f00b001a20c983d21si19149673pln.51.2023.05.16.16.03.50; Tue, 16 May 2023 16:04:05 -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=ZREduQEl; 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 S231149AbjEPW6z (ORCPT + 99 others); Tue, 16 May 2023 18:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230403AbjEPW6y (ORCPT ); Tue, 16 May 2023 18:58:54 -0400 Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6468213E; Tue, 16 May 2023 15:58:53 -0700 (PDT) Received: by mail-qk1-x730.google.com with SMTP id af79cd13be357-75795493bceso13399285a.3; Tue, 16 May 2023 15:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684277932; x=1686869932; 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=obGFfPSstGK57Wl5NPoD/AZ7KNFXNho09WEyyfqv2LU=; b=ZREduQEloKwVflWTdkehKcRky45p76piWosa/r2L3QZuhh+WYc+abP9gftaMGTaEem LRTCRiVJoBKPcIwrDVfFVSWWpt/8hPDwuiw1TONJ7uayYLu5hlW0TBrcXQ5J/5Qy0ksP ZaRUOFswF/L8PY9ff2/QEHB+njQrWLVjnJkUPMmxXsFKv+e6QnGnQmBqhWMDCI5HAdqL LObPBCArRSRNRbEIa414alNX+0R5kDj+FiIOHXSqACjmJw4CigbQzwos3E/c9p/C0rnG He7j9UP5DkZYKo07NNJ6yltATbG4QWMSqcZK3sLpYrtOcu7hNLxRXi+a/asNp0xKPlpk n8kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684277932; x=1686869932; 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=obGFfPSstGK57Wl5NPoD/AZ7KNFXNho09WEyyfqv2LU=; b=OzqN89SNwH2aobvRV0Oz6kTgnjimtJ8ED32wqCms8T4dBB3qsC4TRd1bIvVQjkHsmE Chsg0bghmbbQdhDl8udg6xfg/Rfn0R7smYM4wMHjxamMRHBk+iI5T2eo+UJ1tq+cz6hn AW/aVG0Rz5ZV7LwUiapy0Mv8xrLIlihw2TzqHZCE4yxe95LeAVjf2M7Na4Hfnce9JVJg vnQ3xarz+mxE8QGP6T4pn2K2q1XOL5c7bp/GkQNJY+PGWspbvd5+V0Mml43vpMOusODD ZdEFUdW4QQKpAt/qyhzrfnu++h7uO1QDdEd72AeG3n/1W9fh+h0I93xQtk4eM6r357E+ 4v7w== X-Gm-Message-State: AC+VfDxcytBO7Ojvh9aozeWpjbLYiUNqz53dDypNAl02vrW/Q5pAq2YW Q22oqdlyPW6rJmN7O3shoQ== X-Received: by 2002:ad4:5cce:0:b0:5ee:e4f8:c7e5 with SMTP id iu14-20020ad45cce000000b005eee4f8c7e5mr60470935qvb.41.1684277932388; Tue, 16 May 2023 15:58:52 -0700 (PDT) Received: from C02FL77VMD6R.googleapis.com ([2600:1700:d860:12b0:45b7:59dd:1e6c:1110]) by smtp.gmail.com with ESMTPSA id r17-20020a0ccc11000000b00623813aa1d5sm533307qvk.89.2023.05.16.15.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 15:58:52 -0700 (PDT) Date: Tue, 16 May 2023 15:58:46 -0700 From: Peilin Ye To: Jakub Kicinski Cc: Vlad Buslov , Jiri Pirko , Daniel Borkmann , "David S. Miller" , Eric Dumazet , Paolo Abeni , Jamal Hadi Salim , Cong Wang , Peilin Ye , John Fastabend , Pedro Tammela , Hillf Danton , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Cong Wang Subject: Re: [PATCH net 6/6] net/sched: qdisc_destroy() old ingress and clsact Qdiscs before grafting Message-ID: References: <20230510161559.2767b27a@kernel.org> <20230511162023.3651970b@kernel.org> <20230516122205.6f198c3e@kernel.org> <87y1lojbus.fsf@nvidia.com> <20230516145010.67a7fa67@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230516145010.67a7fa67@kernel.org> 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 On Tue, May 16, 2023 at 02:50:10PM -0700, Jakub Kicinski wrote: > > > Vlad, could you please clarify how you expect the unlocked filter > > > operations to work when the qdisc has global state? > > > > Jakub, I didn't account for per-net_device pointer usage by miniqp code > > hence this bug. I didn't comment on the fix because I was away from my > > PC last week but Peilin's approach seems reasonable to me. When Peilin > > brought up the issue initially I also tried to come up with some trick > > to contain the changes to miniqp code instead of changing core but > > couldn't think of anything workable due to the limitations already > > discussed in this thread. I'm open to explore alternative approaches to > > solving this issue, if that is what you suggest. > > Given Peilin's investigation I think fix without changing core may > indeed be hard. I'm not sure if returning -EBUSY when qdisc refcnt > is elevated will be appreciated by the users, do we already have > similar behavior in other parts of TC? Seems like trying to delete an "in-use" cls_u32 filter returns -EBUSY: net/sched/cls_u32.c: if (ht->refcnt == 1) { u32_destroy_hnode(tp, ht, extack); } else { NL_SET_ERR_MSG_MOD(extack, "Can not delete in-use filter"); return -EBUSY; } Thanks, Peilin Ye