From: Leon Romanovsky <leon@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, netdev@vger.kernel.org,
Jacob Keller <jacob.e.keller@intel.com>,
Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
Marek Szlosek <marek.szlosek@intel.com>
Subject: Re: [PATCH net-next 02/14] ice: convert ice_mbx_clear_malvf to void and use WARN
Date: Tue, 14 Mar 2023 15:41:51 +0200 [thread overview]
Message-ID: <20230314134151.GG36557@unreal> (raw)
In-Reply-To: <20230313182123.483057-3-anthony.l.nguyen@intel.com>
On Mon, Mar 13, 2023 at 11:21:11AM -0700, Tony Nguyen wrote:
> From: Jacob Keller <jacob.e.keller@intel.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@intel.com>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Tested-by: Marek Szlosek <marek.szlosek@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.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@nvidia.com>
next prev parent reply other threads:[~2023-03-14 13:45 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 18:21 [PATCH net-next 00/14][pull request] ice: refactor mailbox overflow detection Tony Nguyen
2023-03-13 18:21 ` [PATCH net-next 01/14] ice: re-order ice_mbx_reset_snapshot function Tony Nguyen
2023-03-14 13:41 ` Leon Romanovsky
2023-03-13 18:21 ` [PATCH net-next 02/14] ice: convert ice_mbx_clear_malvf to void and use WARN Tony Nguyen
2023-03-14 13:41 ` Leon Romanovsky [this message]
2023-03-13 18:21 ` [PATCH net-next 03/14] ice: track malicious VFs in new ice_mbx_vf_info structure Tony Nguyen
2023-03-14 13:43 ` Leon Romanovsky
2023-03-14 21:20 ` Keller, Jacob E
2023-03-13 18:21 ` [PATCH net-next 04/14] ice: move VF overflow message count into struct ice_mbx_vf_info Tony Nguyen
2023-03-13 18:21 ` [PATCH net-next 05/14] ice: remove ice_mbx_deinit_snapshot Tony Nguyen
2023-03-14 13:48 ` Leon Romanovsky
2023-03-13 18:21 ` [PATCH net-next 06/14] ice: merge ice_mbx_report_malvf with ice_mbx_vf_state_handler Tony Nguyen
2023-03-13 18:21 ` [PATCH net-next 07/14] ice: initialize mailbox snapshot earlier in PF init Tony Nguyen
2023-03-14 13:50 ` Leon Romanovsky
2023-03-13 18:21 ` [PATCH net-next 08/14] ice: declare ice_vc_process_vf_msg in ice_virtchnl.h Tony Nguyen
2023-03-13 18:21 ` [PATCH net-next 09/14] ice: always report VF overflowing mailbox even without PF VSI Tony Nguyen
2023-03-13 18:21 ` [PATCH net-next 10/14] ice: remove unnecessary &array[0] and just use array Tony Nguyen
2023-03-13 18:21 ` [PATCH net-next 11/14] ice: pass mbxdata to ice_is_malicious_vf() Tony Nguyen
2023-03-13 18:21 ` [PATCH net-next 12/14] ice: print message if ice_mbx_vf_state_handler returns an error Tony Nguyen
2023-03-13 18:21 ` [PATCH net-next 13/14] ice: move ice_is_malicious_vf() to ice_virtchnl.c Tony Nguyen
2023-03-13 18:21 ` [PATCH net-next 14/14] ice: call ice_is_malicious_vf() from ice_vc_process_vf_msg() Tony Nguyen
2023-03-14 13:57 ` [PATCH net-next 00/14][pull request] ice: refactor mailbox overflow detection Leon Romanovsky
2023-03-14 21:26 ` Jacob Keller
2023-03-15 9:01 ` Leon Romanovsky
2023-03-16 4:40 ` patchwork-bot+netdevbpf
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=20230314134151.GG36557@unreal \
--to=leon@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=marek.szlosek@intel.com \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.