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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 85C3BC4167B for ; Thu, 7 Dec 2023 01:33:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 0B8D26157D; Thu, 7 Dec 2023 01:33:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0B8D26157D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1701912800; bh=3eoq2FF9f6UiSglsL00ZStpblH9gIrzW6aQj8k4V3sI=; h=From:To:In-Reply-To:References:Date:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=ljPN+PhZSMspLYqGbr1AqdkzA6880p5GTrprVlFGQfE5RRCXJfRFwbF1WX4Ni3Wnv kvmz6UH+KsY0RyyxMJdnVzOJfSBDiFeH+tSH2AOk+qHHsbe3vpFoL1mBbfVpyxhbMD T9vBX2VtpKdlcKMMoAKBmm6MtySJrCgB5vnseyqoRd9sTuojU7mTzLHm26ykvZ6eCm qOGqDU/0rPIDSjyIDMOjUoRrKvvpLO8KHV5yLYFw0QsDbLS4AStwV4H1but7xb225u jvFsyoODoMucFiO9UBzwsb2wNkdsgE9GVIMFYXuF6a09qaELd7V1jtK3mqzsipc543 r10oPHZSU1Cdg== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4zZLVexkTMcO; Thu, 7 Dec 2023 01:33:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 0C4B661591; Thu, 7 Dec 2023 01:33:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0C4B661591 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 55A2E1BF359 for ; Thu, 7 Dec 2023 01:33:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2B6F440191 for ; Thu, 7 Dec 2023 01:33:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2B6F440191 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cZVaA4BuE__v for ; Thu, 7 Dec 2023 01:33:16 +0000 (UTC) X-Greylist: delayed 428 seconds by postgrey-1.37 at util1.osuosl.org; Thu, 07 Dec 2023 01:33:16 UTC DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 19EEC40017 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by smtp2.osuosl.org (Postfix) with ESMTPS id 19EEC40017 for ; Thu, 7 Dec 2023 01:33:15 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="1231760" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="1231760" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 17:26:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="19518060" Received: from alwohlse-mobl.amr.corp.intel.com (HELO vcostago-mobl3) ([10.209.58.167]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 17:26:06 -0800 From: Vinicius Costa Gomes To: Kurt Kanzenbach , Jesse Brandeburg , Tony Nguyen In-Reply-To: <20231206140718.57433-1-kurt@linutronix.de> References: <20231206140718.57433-1-kurt@linutronix.de> Date: Wed, 06 Dec 2023 17:26:05 -0800 Message-ID: <87r0jy6bwy.fsf@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701912796; x=1733448796; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=i4yeWVE6+wrgX9vmL6iqP5eumdCMoGTglZZEcsnM/FM=; b=S28kej9awTBu/LTousWAWnyMdVE9nJ7p04xtmjsqRueRhjbinOExxUiy R1Fjib7XJLXtHqkWZ0xtXBLRdeY6tek3haR7gDFxpxugNxp38QdmjS4lQ 4HtI6zGcncOueqz34PCwuJCsmRuZG78/m3y2tLZjg+n3mDQySXXJuQZbQ bNDCDYiGccTaUoBq0zr+Aw6lNxkEgBBOqYf5OIseEEvkvkcgUrjCSMNTN YpsMIuwV0tGY8k3tZtucx5Rv70kjj9qtS/ISoObzSbNMVhJyC6YuptfPr MwWC/zrqfSi67vD9udeEo38aALRbYWiTn8xNNQF46itOGIdUetbQ5XNi1 w==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=S28kej9a Subject: Re: [Intel-wired-lan] [PATCH iwl-net] igc: Check VLAN EtherType mask X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Kurt Kanzenbach , Eric Dumazet , intel-wired-lan@lists.osuosl.org, Jakub Kicinski , Paolo Abeni , "David S. Miller" , Suman Ghosh Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Kurt Kanzenbach writes: > Currently the driver accepts VLAN EtherType steering rules regardless of > the configured mask. And things might fail silently or with confusing error > messages to the user. The VLAN EtherType can only be matched by full > mask. Therefore, add a check for that. > > For instance the following rule is invalid, but the driver accepts it and > ignores the user specified mask: > |root@host:~# ethtool -N enp3s0 flow-type ether vlan-etype 0x8100 \ > | m 0x00ff action 0 > |Added rule with ID 63 > |root@host:~# ethtool --show-ntuple enp3s0 > |4 RX rings available > |Total 1 rules > | > |Filter: 63 > | Flow Type: Raw Ethernet > | Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF > | Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF > | Ethertype: 0x0 mask: 0xFFFF > | VLAN EtherType: 0x8100 mask: 0x0 > | VLAN: 0x0 mask: 0xffff > | User-defined: 0x0 mask: 0xffffffffffffffff > | Action: Direct to queue 0 > > After: > |root@host:~# ethtool -N enp3s0 flow-type ether vlan-etype 0x8100 \ > | m 0x00ff action 0 > |rmgr: Cannot insert RX class rule: Operation not supported > > Fixes: 2b477d057e33 ("igc: Integrate flex filter into ethtool ops") > Suggested-by: Suman Ghosh > Signed-off-by: Kurt Kanzenbach > --- I was just wondering if an alternative would be to use flex filters for matching vlan-etype with a partial mask. But I don't think there's any real use case for partial masks, better to reject them: Acked-by: Vinicius Costa Gomes Cheers, -- Vinicius _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan