> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Szapar-Mudlaw, Martyna
> Sent: Tuesday, March 4, 2025 2:12 PM
> To: Paul Menzel <[email protected]>; Glaza, Jan <[email protected]>
> Cc: [email protected]; [email protected]; Jagielski, 
> Jedrzej
> <[email protected]>; Simon Horman <[email protected]>; Lobakin,
> Aleksander <[email protected]>
> Subject: Re: [Intel-wired-lan] [iwl-net v3 1/5] virtchnl: make proto and 
> filter
> action count unsigned
> 
> 
> 
> On 3/4/2025 12:51 PM, Paul Menzel wrote:
> > Dear Martyna,
> >
> >
> > Thank you for your quick reply.
> >
> > Am 04.03.25 um 12:45 schrieb Szapar-Mudlaw, Martyna:
> >
> >> On 3/4/2025 12:15 PM, Paul Menzel wrote:
> >
> >>> Am 04.03.25 um 12:08 schrieb Martyna Szapar-Mudlaw:
> >>>> From: Jan Glaza <[email protected]>
> >>>>
> >>>> The count field in virtchnl_proto_hdrs and
> >>>> virtchnl_filter_action_set should never be negative while still
> >>>> being valid. Changing it from int to u32 ensures proper handling of
> >>>> values in virtchnl messages in driverrs and prevents unintended behavior.
> >>>> In its current signed form, a negative count does not trigger an
> >>>> error in ice driver but instead results in it being treated as 0.
> >>>> This can lead to unexpected outcomes when processing messages.
> >>>> By using u32, any invalid values will correctly trigger -EINVAL,
> >>>> making error detection more robust.
> >>>>
> >>>> Fixes: 1f7ea1cd6a374 ("ice: Enable FDIR Configure for AVF")
> >>>> Reviewed-by: Jedrzej Jagielski <[email protected]>
> >>>> Reviewed-by: Simon Horman <[email protected]>
> >>>> Signed-off-by: Jan Glaza <[email protected]>
> >>>> Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-
> >>>> [email protected]>
> >>>> ---
> >>>>   include/linux/avf/virtchnl.h | 4 ++--
> >>>>   1 file changed, 2 insertions(+), 2 deletions(-)
> >>>>
> >>>> diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/
> >>>> virtchnl.h index 4811b9a14604..cf0afa60e4a7 100644
> >>>> --- a/include/linux/avf/virtchnl.h
> >>>> +++ b/include/linux/avf/virtchnl.h
> >>>> @@ -1343,7 +1343,7 @@ struct virtchnl_proto_hdrs {


Tested-by: Rafal Romanowski <[email protected]>


Reply via email to