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 6B81DC46CD3 for ; Tue, 26 Dec 2023 17:02:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2218360C15; Tue, 26 Dec 2023 17:02:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2218360C15 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1703610126; bh=K7k2jU+ADHd8hYMHLFs+7ZElY/03e4ukNG9Fl7FDBrA=; h=Date:To:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=1SByWLaaUTPXRNL0rGNwVs7reovXB16yXySOQHakI7XhHVtDe5eSK+FW9FAlloKCD iU/f2hUNLxAVawaGJNFCc7bL5D7j+Cko1537qgBiGWiExvt1xg4nBCOwvGlEFOdBRd Htyx62etPy/QGg821/k7nyNJaE4L7jfwfvjuEDGKvUEGD/xsLwnSIeeuZZZfRO0Lyh fE2fetJPuEjiwqUODCAaX0hNb1sC7wAy0RGItSUVg2JHdn028GvvAxDtVwzW96eo/M WTe/+/fGkkY2Gp60nj3xY0teuc42WFtCuNf4d9dJ5H0hj0ymOF/KH8ju0yK+UDgONd 2z+sbO99Pfdog== 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 9PZ7BU-qPH3s; Tue, 26 Dec 2023 17:02:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 2F36860D5F; Tue, 26 Dec 2023 17:02:05 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2F36860D5F Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 729D41BF228 for ; Tue, 26 Dec 2023 17:02:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 568BC40894 for ; Tue, 26 Dec 2023 17:02:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 568BC40894 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6SckBYBEOwXx for ; Tue, 26 Dec 2023 17:02:02 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by smtp4.osuosl.org (Postfix) with ESMTPS id 6218E4088C for ; Tue, 26 Dec 2023 17:02:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6218E4088C X-IronPort-AV: E=McAfee;i="6600,9927,10935"; a="375857449" X-IronPort-AV: E=Sophos;i="6.04,306,1695711600"; d="scan'208";a="375857449" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Dec 2023 09:02:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,306,1695711600"; d="scan'208";a="12481701" Received: from naamamex-mobl.ger.corp.intel.com (HELO [10.245.129.131]) ([10.245.129.131]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Dec 2023 09:01:58 -0800 Message-ID: Date: Tue, 26 Dec 2023 19:01:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Kurt Kanzenbach , Jesse Brandeburg , Tony Nguyen , Vinicius Costa Gomes References: <20231206140718.57433-1-kurt@linutronix.de> From: "naamax.meir" In-Reply-To: <20231206140718.57433-1-kurt@linutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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=1703610122; x=1735146122; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=zJ7CtVcCDygQofHMrkLBKx6IYn9hgp47oohYPYfHX9Q=; b=md5eqe3XUQQNxDcCyMX0fvasnaV+Wq0o37owGdn8t1bYZPUna50dwl2u yifLCxPtNgwFoueddvodp8zXb2RgzMBvjBfFkIlG4Ega0Y0YiUy2ScH3U jtsXVl/oEnVwOhPHwngymKS5jKfoLr112C+B3gBr4kzbgGfc048/3JtCs W6r726MinEOaZpJkzsmDBJqPGahfm3isxfEiq8MK4zKzwlOAB76UYZ5Uw i3sAGEIf2BGvNJUDQFnU7IAgAAVv9ezi5oSNoq7dZfx4FbsrrYQ85asJL 5+dLBSyOjxK8HtO1iz0yf0QCZ3MA2hEGp5/vSNjs5/TZVnBBKQx6pC9W2 w==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=md5eqe3X 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, Eric Dumazet , intel-wired-lan@lists.osuosl.org, Jakub Kicinski , Paolo Abeni , "David S. Miller" , Suman Ghosh Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On 12/6/2023 16:07, Kurt Kanzenbach wrote: > 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 > --- > > Note: This is a follow up of > > https://lore.kernel.org/netdev/20231201075043.7822-1-kurt@linutronix.de/ > > and should apply to net-queue tree. > > drivers/net/ethernet/intel/igc/igc_ethtool.c | 8 ++++++++ > 1 file changed, 8 insertions(+) Tested-by: Naama Meir