From: Simon Horman <horms@kernel.org>
To: Lukasz Plachno <lukasz.plachno@intel.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>,
netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
Jakub Buchocki <jakubx.buchocki@intel.com>,
Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3 2/2] ice: Implement 'flow-type ether' rules
Date: Sat, 16 Dec 2023 10:03:37 +0000 [thread overview]
Message-ID: <20231216100337.GL6288@kernel.org> (raw)
In-Reply-To: <20231214043449.15835-3-lukasz.plachno@intel.com>
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
next prev parent reply other threads:[~2023-12-16 10:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 4:34 [Intel-wired-lan] [PATCH iwl-next v3 0/2] ice: Support flow director ether type filters Lukasz Plachno
2023-12-14 4:34 ` [Intel-wired-lan] [PATCH iwl-next v3 1/2] ice: Remove unnecessary argument from ice_fdir_comp_rules() Lukasz Plachno
2023-12-16 10:04 ` Simon Horman
2023-12-14 4:34 ` [Intel-wired-lan] [PATCH iwl-next v3 2/2] ice: Implement 'flow-type ether' rules Lukasz Plachno
2023-12-16 10:03 ` Simon Horman [this message]
2023-12-19 14:04 ` Plachno, Lukasz
2023-12-19 17:35 ` Brett Creeley
2023-12-20 14:19 ` Plachno, Lukasz
2023-12-20 17:11 ` Brett Creeley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231216100337.GL6288@kernel.org \
--to=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jakubx.buchocki@intel.com \
--cc=lukasz.plachno@intel.com \
--cc=mateuszx.pacuszka@intel.com \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox