> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of 
> Amritha Nambiar
> Sent: Wednesday, February 14, 2024 1:19 AM
> To: [email protected]
> Cc: Samudrala, Sridhar <[email protected]>; Nguyen, Anthony L 
> <[email protected]>; Brandeburg, Jesse <[email protected]>; 
> Nambiar, Amritha <[email protected]>
> Subject: [Intel-wired-lan] [net PATCH] ice: Fix ASSERT_RTNL() warning during 
> certain scenarios
>
> Commit 91fdbce7e8d6 ("ice: Add support in the driver for associating
> queue with napi") invoked the netif_queue_set_napi() call. This
> kernel function requires to be called with rtnl_lock taken,
> otherwise ASSERT_RTNL() warning will be triggered. ice_vsi_rebuild()
> initiating this call is under rntl_lock when the rebuild is in
> response to configuration changes from external interfaces (such as
> tc, ethtool etc. which holds the lock). But, the VSI rebuild
> generated from service tasks and resets (PFR/CORER/GLOBR) is not
> under rtnl lock protection. Handle these cases as well to hold lock
> before the kernel call (by setting the 'locked' boolean to false).
>
> netif_queue_set_napi() is also used to clear previously set napi
> in the q_vector unroll flow. Handle this for locked/lockless execution
> paths.
>
> Fixes: 91fdbce7e8d6 ("ice: Add support in the driver for associating queue 
> with napi")
> Signed-off-by: Amritha Nambiar <[email protected]>
> Reviewed-by: Sridhar Samudrala <[email protected]>
> ---
>  drivers/net/ethernet/intel/ice/ice_base.c |   10 +--
>  drivers/net/ethernet/intel/ice/ice_lib.c  |   86 
> +++++++++++++++++++++++------
>  drivers/net/ethernet/intel/ice/ice_lib.h  |   10 +++
>  drivers/net/ethernet/intel/ice/ice_main.c |    3 +
>  4 files changed, 83 insertions(+), 26 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <[email protected]> (A 
Contingent worker at Intel)

Reply via email to