[{"id":3666472,"web_url":"http://patchwork.ozlabs.org/comment/3666472/","msgid":"<20260319180727.GR1753385@horms.kernel.org>","list_archive_url":null,"date":"2026-03-19T18:07:27","subject":"Re: [Intel-wired-lan] [PATCH iwl-next 0/4] iavf: fix VLAN filter\n state machine races","submitter":{"id":82748,"url":"http://patchwork.ozlabs.org/api/people/82748/","name":"Simon Horman","email":"horms@kernel.org"},"content":"On Mon, Mar 16, 2026 at 11:42:05AM +0100, Petr Oros wrote:\n> The iavf VLAN filter state machine has several design issues that lead\n> to race conditions between userspace add/del calls and the watchdog\n> task's virtchnl processing.  Filters can get lost or leak HW resources,\n> especially during interface down/up cycles and namespace moves.\n> \n> The root problems:\n> \n> 1) On interface down, all VLAN filters are sent as DEL to PF and\n>    re-added on interface up.  This is unnecessary and creates multiple\n>    race windows (details below).\n> \n> 2) The DELETE path immediately frees the filter struct after sending\n>    the DEL message, without waiting for PF confirmation.  If the PF\n>    rejects the DEL, the filter remains in HW but the driver lost its\n>    tracking structure.  Race conditions between a pending DEL and\n>    add/reset operations cannot be resolved because the struct is gone.\n> \n> 3) VIRTCHNL_OP_ADD_VLAN (V1) had no success completion handler, so\n>    filters stayed in IS_NEW state permanently.\n\n...\n\n> This series addresses all three issues:\n> \n> Patch 1 renames IS_NEW to ADDING for clarity.\n> \n> Patch 2 removes the DISABLE/INACTIVE state machinery so VLAN filters\n> stay ACTIVE across down/up cycles.  This is the core behavioral\n> change -- VLAN filters are no longer sent as DEL to PF on interface\n> down, and iavf_restore_filters() is removed since there is nothing\n> to restore.\n> \n> Patch 3 adds a REMOVING state to make the DELETE path symmetric with\n> ADD -- filters are only freed after PF confirms the deletion.  If the\n> PF rejects the DEL, the filter reverts to ACTIVE instead of being\n> lost.\n> \n> Patch 4 hardens the remaining race windows: adds V1 ADD success\n> handler and prevents redundant DEL on filters already in REMOVING\n> state.\n\nFor the series:\n\nReviewed-by: Simon Horman <horms@kernel.org>","headers":{"Return-Path":"<intel-wired-lan-bounces@osuosl.org>","X-Original-To":["incoming@patchwork.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=69PlxW2B;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fcDF71MPmz1y0M\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 20 Mar 2026 05:07:38 +1100 (AEDT)","from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 56082840F4;\n\tThu, 19 Mar 2026 18:07:37 +0000 (UTC)","from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id M8ohmIuP8rgA; Thu, 19 Mar 2026 18:07:36 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 89599840E1;\n\tThu, 19 Mar 2026 18:07:36 +0000 (UTC)","from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by lists1.osuosl.org (Postfix) with ESMTP id C2E53265\n for <intel-wired-lan@lists.osuosl.org>; Thu, 19 Mar 2026 18:07:34 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id B479D60B3E\n for <intel-wired-lan@lists.osuosl.org>; Thu, 19 Mar 2026 18:07:34 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id GuN0BTWrOKxI for <intel-wired-lan@lists.osuosl.org>;\n Thu, 19 Mar 2026 18:07:33 +0000 (UTC)","from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31])\n by smtp3.osuosl.org (Postfix) with ESMTPS id B17C460B38\n for <intel-wired-lan@lists.osuosl.org>; Thu, 19 Mar 2026 18:07:33 +0000 (UTC)","from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by sea.source.kernel.org (Postfix) with ESMTP id 46D094171C;\n Thu, 19 Mar 2026 18:07:33 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id CD492C19424;\n Thu, 19 Mar 2026 18:07:30 +0000 (UTC)"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp1.osuosl.org 89599840E1","OpenDKIM Filter v2.11.0 smtp3.osuosl.org B17C460B38"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1773943656;\n\tbh=MMmXS5usa/DDMyie4xfZBHeyrs8qMgKjI/oEAFpaaFs=;\n\th=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=69PlxW2BRQBQewaNwx8Tq4C7UOTfqGojcCemvlIFHTxfVUFVUHwGPPfZxxzRcZ1V4\n\t wEec2ZUp7IHR0j4/AZOtAYyWwdBn54dL4Mh+YhlP+GdVRk5clc0yOiMAJt06YZPJbs\n\t G2Lyse3da4ZctUeixIWPpbxXKuDKbBh9+wTzrDK40BgtJVxcTcTKzk8XzlRVjf8sE+\n\t pNLGYqH98yIBPjm+EFIORDV45Y2V/EAk9ujzsZNlVFotXZMxk7Jtp/q/7webMa0fN9\n\t KE3Pg7XLXr4/DwYX45DP+LaNpAw8dq/o2aSKSWl+hedhyEHlL+bao0/a2wxEbCdz/T\n\t afC8/69d0vVKQ==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=172.234.252.31;\n helo=sea.source.kernel.org; envelope-from=horms@kernel.org;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp3.osuosl.org B17C460B38","Date":"Thu, 19 Mar 2026 18:07:27 +0000","From":"Simon Horman <horms@kernel.org>","To":"Petr Oros <poros@redhat.com>","Cc":"netdev@vger.kernel.org, jacob.e.keller@intel.com,\n Tony Nguyen <anthony.l.nguyen@intel.com>,\n Przemek Kitszel <przemyslaw.kitszel@intel.com>,\n Andrew Lunn <andrew+netdev@lunn.ch>,\n \"David S. Miller\" <davem@davemloft.net>,\n Eric Dumazet <edumazet@google.com>,\n Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,\n intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org","Message-ID":"<20260319180727.GR1753385@horms.kernel.org>","References":"<20260316104209.1285962-1-poros@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260316104209.1285962-1-poros@redhat.com>","X-Mailman-Original-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n d=kernel.org; s=k20201202; t=1773943653;\n bh=9/v9OP+6OoUAkiwOeDU2rKV1U3W0BWlpsm/v5xokvz0=;\n h=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n b=cXyPtihU0kjoUTzPRkOuvJzwKE+bvWJ4WSA1BN674OWWgMSbd+2Tvj9p95JiQ3Bn5\n yA6QKyNWADA9xziy1CjoborO+zXGyViz+mWIuYLJrWnqXgAzLIu8z+SUaWsSGsw2KA\n lvUdrp4UrBSF7K4auaKuo4P+VxzrGs6BrIvZct0lgHqLL52g9F2ZFjAxKnW3lHLrZp\n 6HR3h1AAOtCz10CJ3UB0twbZZ5lFDZOObQJwQVE8U9LJipcrK2EbQ1GJSkA/XzDO2w\n jbyQ1M7Nq49+BFgGqG9GWA9KkeptkaNR1LAp+GGnD37b4gGelx/53gkmD9IVD2/SD0\n KFrNKnbb4Jc0w==","X-Mailman-Original-Authentication-Results":["smtp3.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=kernel.org","smtp3.osuosl.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.a=rsa-sha256 header.s=k20201202 header.b=cXyPtihU"],"Subject":"Re: [Intel-wired-lan] [PATCH iwl-next 0/4] iavf: fix VLAN filter\n state machine races","X-BeenThere":"intel-wired-lan@osuosl.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>","List-Unsubscribe":"<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>","List-Archive":"<http://lists.osuosl.org/pipermail/intel-wired-lan/>","List-Post":"<mailto:intel-wired-lan@osuosl.org>","List-Help":"<mailto:intel-wired-lan-request@osuosl.org?subject=help>","List-Subscribe":"<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"}}]