Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1299817rwd; Tue, 16 May 2023 15:09:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4EDw3Ur9rqwgn7H5PVVFwFrxtYAQjy67k6DC2+MXq1FIuxQvh+Im7IAHqSwzI016sfTxFp X-Received: by 2002:a05:6a20:432c:b0:f2:eb8b:77a3 with SMTP id h44-20020a056a20432c00b000f2eb8b77a3mr47226361pzk.35.1684274998921; Tue, 16 May 2023 15:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684274998; cv=none; d=google.com; s=arc-20160816; b=fFoYLta7LGySuVKVVlc2UfVq13aUYiBFJGsp16uk+6hISITeVOjBDJ7YdsAYpimKgA CA3BvqXIgi2+Oa1g+8IP8c3KQWvzk0CyxWaq39YJtXqRfYzaa4oCx4JnGI1mSdhPwWp0 Lq/mdMPgN/nHbpv2u8aegWXirgwRK1CWrf1+0YPG8XqRIK644+sVLgSiqm2AJfJQg8ft EglXYH4jElaCg1kVcptcw24J5TdzE9jSwkbj73752k0ubAQhwZ89FlRRSagSAyTVeeDw nWkHWRqd8TDMPjdgffcIe0Z2HiFhzs56bmYugOnc7UOqVEVtxQX+/wV0DdRJ+KEj1MrV g2bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=n8C71OvAxxw7KtzzZb5dGo1x0/wlal7C51i/H0UExnk=; b=XBPkPn7Qs09ZGKkPZOktx6wQ10MDhC6JwCb64ZLtDSszGQfhRQnqZYr0D1NDipiq0T 30Tk4irEhvY3Ww/aD4RGVWowJGrUj2avDLLTQj4hQmftfW8WEcL84uHqT8bViMUwH2eA kUsO8EoMsvm+61ByRd2EzpvZ2eMgorgb/zcR78WXgypZjSDoIKgNhDEfPUp5A4es21Kk vt2Sv3gTzRmeUIZUDHDxM+SQnNmFFuOU2VfNKJwLpBfUHAS39H4873RdNwB/4VRocy4B Gcd6dknRkqjOuFB0/Qd0dFOtfzfI1WD0832axu37fnfCG5GdxrsQxfO3qtXizZ1Q0gc8 OOoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fVWIMxwd; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020aa796c8000000b00643a2b0c6c8si20308855pfq.106.2023.05.16.15.09.44; Tue, 16 May 2023 15:09:58 -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=@kernel.org header.s=k20201202 header.b=fVWIMxwd; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230154AbjEPVuQ (ORCPT + 99 others); Tue, 16 May 2023 17:50:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjEPVuN (ORCPT ); Tue, 16 May 2023 17:50:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55A495FDC for ; Tue, 16 May 2023 14:50:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E768D63FBB for ; Tue, 16 May 2023 21:50:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0371C433EF; Tue, 16 May 2023 21:50:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684273811; bh=yKkl+O+uwemVUkRqo3YT8W36ra+vpuQRbPNcizoUogE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fVWIMxwdFdnveGr0Eu1f+wb2bNaPbs0KhmFzgzLq704feoxQL0vucOiJjQUONdpmh dr5/MV75n/TuMO2OihaPfcn6cHE3Zg14Ap7UpvvBRVeMGp4CmsDRBcukl8yGM5TaKA azfMmCrsroyXZ+oM6Tjw2puCtKmyBqgvdXnDdz9ssNWjBi5C8CFXHoHUXspB2u/30V FCwN5x41wuOa42vanctEHH1taIIVqRcBkSC5wLJuTzAFCwc16RaNESgkKG+c+NxMTT /9R4ylh9qWb8PHSXVoM2CfA/hGw41Eo2q1k4zeCbBJUKGsr7YaZUr9WjEamy3Vkujb UrEvX4+wuO1qQ== Date: Tue, 16 May 2023 14:50:10 -0700 From: Jakub Kicinski To: Vlad Buslov Cc: Peilin Ye , Jiri Pirko , "Daniel Borkmann" , "David S. Miller" , Eric Dumazet , Paolo Abeni , "Jamal Hadi Salim" , Cong Wang , "Peilin Ye" , John Fastabend , Pedro Tammela , Hillf Danton , , , Cong Wang Subject: Re: [PATCH net 6/6] net/sched: qdisc_destroy() old ingress and clsact Qdiscs before grafting Message-ID: <20230516145010.67a7fa67@kernel.org> In-Reply-To: <87y1lojbus.fsf@nvidia.com> References: <20230508183324.020f3ec7@kernel.org> <20230510161559.2767b27a@kernel.org> <20230511162023.3651970b@kernel.org> <20230516122205.6f198c3e@kernel.org> <87y1lojbus.fsf@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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, 16 May 2023 22:35:51 +0300 Vlad Buslov 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?