[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230314134151.GG36557@unreal>
Date: Tue, 14 Mar 2023 15:41:51 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com, netdev@...r.kernel.org,
Jacob Keller <jacob.e.keller@...el.com>,
Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
Marek Szlosek <marek.szlosek@...el.com>
Subject: Re: [PATCH net-next 02/14] ice: convert ice_mbx_clear_malvf to void
and use WARN
On Mon, Mar 13, 2023 at 11:21:11AM -0700, Tony Nguyen wrote:
> From: Jacob Keller <jacob.e.keller@...el.com>
>
> The ice_mbx_clear_malvf function checks for a few error conditions before
> clearing the appropriate data. These error conditions are really warnings
> that should never occur in a properly initialized driver. Every caller of
> ice_mbx_clear_malvf just prints a dev_dbg message on failure which will
> generally be ignored.
>
> Convert this function to void and switch the error return values to
> WARN_ON. This will make any potentially misconfiguration more visible and
> makes future refactors that involve changing how we store the malicious VF
> data easier.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> Tested-by: Marek Szlosek <marek.szlosek@...el.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> ---
> drivers/net/ethernet/intel/ice/ice_sriov.c | 6 ++----
> drivers/net/ethernet/intel/ice/ice_vf_lib.c | 12 ++++--------
> drivers/net/ethernet/intel/ice/ice_vf_mbx.c | 16 +++++++---------
> drivers/net/ethernet/intel/ice/ice_vf_mbx.h | 2 +-
> 4 files changed, 14 insertions(+), 22 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@...dia.com>
Powered by blists - more mailing lists