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 A46C6C7EE24 for ; Tue, 16 May 2023 21:50:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230189AbjEPVuR (ORCPT ); Tue, 16 May 2023 17:50:17 -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 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?