From: "Plachno, Lukasz" <lukasz.plachno@intel.com>
To: Simon Horman <horms@kernel.org>
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 v2 2/2] ice: Implement 'flow-type ether' rules
Date: Thu, 14 Dec 2023 09:19:23 +0100 [thread overview]
Message-ID: <4bf80a63-868b-4ed6-9e73-ba79a1315bad@intel.com> (raw)
In-Reply-To: <20231212102913.GX5817@kernel.org>
On 12/12/2023 11:29 AM, Simon Horman wrote:
> On Thu, Dec 07, 2023 at 01:48:40PM +0100, Lukasz Plachno wrote:
>> From: Jakub Buchocki <jakubx.buchocki@intel.com>
>>
>> Add support for 'flow-type ether' Flow Director rules via ethtool.
>>
>> Rules not containing masks are processed by the Flow Director,
>> and support the following set of input parameters in all combinations:
>> src, dst, proto, vlan-etype, vlan, action.
>>
>> It is possible to specify address mask in ethtool parameters but only
>> 00:00:00:00:00 and FF:FF:FF:FF:FF are valid.
>> The same applies to proto, vlan-etype and vlan masks:
>> only 0x0000 and 0xffff masks are valid.
>>
>> Signed-off-by: Jakub Buchocki <jakubx.buchocki@intel.com>
>> Co-developed-by: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
>> Signed-off-by: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
>> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>> Signed-off-by: Lukasz Plachno <lukasz.plachno@intel.com>
>
> ...
>
>> @@ -1268,6 +1374,16 @@ ice_cfg_fdir_xtrct_seq(struct ice_pf *pf, struct ethtool_rx_flow_spec *fsp,
>> ret = ice_set_fdir_ip6_usr_seg(seg, &fsp->m_u.usr_ip6_spec,
>> &perfect_filter);
>> break;
>> + case ETHER_FLOW:
>> + ret = ice_set_ether_flow_seg(seg, &fsp->m_u.ether_spec);
>> + if (!ret && (fsp->m_ext.vlan_etype || fsp->m_ext.vlan_tci)) {
>> + if (!ice_fdir_vlan_valid(fsp)) {
>> + ret = -EINVAL;
>> + break;
>> + }
>> + ret = ice_set_fdir_vlan_seg(seg, &fsp->m_ext);
>> + }
>> + break;
>> default:
>> ret = -EINVAL;
>> }
>
> Hi Jakub,
>
> A bit further down this function, perfect_filter is used as follows.
>
> ...
>
> if (user && user->flex_fltr) {
> perfect_filter = false;
> ...
> }
>
> ...
>
> assign_bit(fltr_idx, hw->fdir_perfect_fltr, perfect_filter);
>
> And unlike other non-error cases handled in the switch statement,
> the new ETHER_FLOW case does not set perfect_filter.
>
> It's unclear to me if this is actually the case or not,
> but Smatch flags that perfect_filter may now be used uninitialised
> in the assign_bit() call above.
>
> ...
Hi Simon,
Thank you for pointing that out, perfect_filter should be initialized to
false, I will fix that in V3.
Thanks,
Łukasz
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
prev parent reply other threads:[~2023-12-14 8:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 12:48 [Intel-wired-lan] [PATCH iwl-next v2 0/2] ice: Support flow director ether type filters Lukasz Plachno
2023-12-07 12:48 ` [Intel-wired-lan] [PATCH iwl-next v2 1/2] ice: Remove unnecessary argument from ice_fdir_comp_rules() Lukasz Plachno
2023-12-07 12:48 ` [Intel-wired-lan] [PATCH iwl-next v2 2/2] ice: Implement 'flow-type ether' rules Lukasz Plachno
2023-12-12 10:29 ` Simon Horman
2023-12-14 8:19 ` Plachno, Lukasz [this message]
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=4bf80a63-868b-4ed6-9e73-ba79a1315bad@intel.com \
--to=lukasz.plachno@intel.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jakubx.buchocki@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