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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 0D09EC38147 for ; Sat, 16 Dec 2023 10:03:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 89E6A83EE3; Sat, 16 Dec 2023 10:03:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 89E6A83EE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1702721031; bh=C5KpCxemhSdO5r+xefZxowm8mh+enmRgKRqzq6SYkkQ=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=VH+RuytlCcKwDH7N7BoKU86SDpRBptqtztwKUfY7KdZlpA2ZrwaLc0QKfGVuyKETC Xg2xS9UzMme/rMAGl1ULc5tiSSXgbGF7Ks5J7t5fBY4E7X58OQ2pYUgLJaKBLbF2f9 IFcGJtMuGdAj0aPIP99vJU22+5Hh+u4UagmPvjQ6d8Ck9Cpdl4cEVg9JciGJ0ARCKI 4hYsqecsibbp9u5//uC7mHJbXVan6vt/tSP930cB4Jz3ybyQKa+kEsdDUiVASForGN w86W2pMxXw5qndYPKkBj26vgNLgu3EbrlPnVSugjUMUg0+gWPqrMSryIDEC4kEd9ll kck2Z/g+q2rWw== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5K4APJ3I4aJh; Sat, 16 Dec 2023 10:03:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 8A85D83EE7; Sat, 16 Dec 2023 10:03:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8A85D83EE7 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 65F1B1BF338 for ; Sat, 16 Dec 2023 10:03:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3E40E42261 for ; Sat, 16 Dec 2023 10:03:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3E40E42261 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 uQDzXUngz6yy for ; Sat, 16 Dec 2023 10:03:47 +0000 (UTC) Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by smtp4.osuosl.org (Postfix) with ESMTPS id 7362E4225F for ; Sat, 16 Dec 2023 10:03:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 7362E4225F Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 4B3E3CE08BE; Sat, 16 Dec 2023 10:03:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70517C433C8; Sat, 16 Dec 2023 10:03:40 +0000 (UTC) Date: Sat, 16 Dec 2023 10:03:37 +0000 From: Simon Horman To: Lukasz Plachno Message-ID: <20231216100337.GL6288@kernel.org> References: <20231214043449.15835-1-lukasz.plachno@intel.com> <20231214043449.15835-3-lukasz.plachno@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231214043449.15835-3-lukasz.plachno@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702721021; bh=GR78kp2M52nF0sM0SHOrXYdt45Bz3o9fsu/Czb3BiDw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JIGSJ2dcK1OHQCGbQH5TgNPW4ooAYhW9QbC9hMrn/r6F1f99dLs4+wWGmjsYPBtR+ s7q3SujUNKg3kYyKq6EqmPB38a8eXuY0AGjWzhL1BlgZMITTRP6Btk9EK3EFTAmftL 3P9sRz0vfA8UbIaqv5ykkkxewk6aVnuRNBJEzOxg/WexAarzp1YtNJod9AMzyu9nWx aVFmr+n6K0ujcQv7EQJwBlEJ27Rc3C0m51lahJjUA2CTwkgR1KAugOtWF8Eb2Voeb2 QLlKCK0ma8f/zZf7bxUEO9w0wfihHje7pa/l7mOsBaWSycHTMsa29uDduo7VsMlXzV zEPqsK9IJCc8Q== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=JIGSJ2dc Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3 2/2] ice: Implement 'flow-type ether' rules 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: Przemek Kitszel , netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Jakub Buchocki , Mateusz Pacuszka Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Thu, Dec 14, 2023 at 05:34:49AM +0100, Lukasz Plachno wrote: ... > @@ -1199,6 +1212,99 @@ ice_set_fdir_ip6_usr_seg(struct ice_flow_seg_info *seg, > return 0; > } > > +/** > + * ice_fdir_vlan_valid - validate VLAN data for Flow Director rule > + * @fsp: pointer to ethtool Rx flow specification > + * > + * Return: true if vlan data is valid, false otherwise > + */ > +static bool ice_fdir_vlan_valid(struct ethtool_rx_flow_spec *fsp) > +{ > + if (fsp->m_ext.vlan_etype && > + ntohs(fsp->h_ext.vlan_etype) & ~(ETH_P_8021Q | ETH_P_8021AD)) > + return false; Hi Jakub and Lukasz, It is not obvious to me that a bitwise comparison of the vlan_ethtype is correct. Possibly naively I expected something more like (completely untested!): if (!eth_type_vlan(sp->m_ext.vlan_etype)) return false: > + > + if (fsp->m_ext.vlan_tci && > + ntohs(fsp->h_ext.vlan_tci) >= VLAN_N_VID) > + return false; > + > + return true; > +} ... _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan