[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA3PR11MB898603B59EB612C386594BEBE515A@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Mon, 15 Sep 2025 06:30:50 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: "Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, Simon Horman
<horms@...nel.org>, "Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>,
"Keller, Jacob E" <jacob.e.keller@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next 1/9] ice: enforce RTNL
assumption of queue NAPI manipulation
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Przemek Kitszel
> Sent: Friday, September 12, 2025 3:06 PM
> To: intel-wired-lan@...ts.osuosl.org; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>
> Cc: netdev@...r.kernel.org; Simon Horman <horms@...nel.org>; Kitszel,
> Przemyslaw <przemyslaw.kitszel@...el.com>; Keller, Jacob E
> <jacob.e.keller@...el.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next 1/9] ice: enforce RTNL
> assumption of queue NAPI manipulation
>
> Instead of making assumptions in comments move them into code.
> Be also more precise, RTNL must be locked only when there is NAPI, and
> we have VSIs w/o NAPI that call ice_vsi_clear_napi_queues() during
> rmmod.
>
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> ---
> CC:Larysa Zaremba <larysa.zaremba@...el.com>
> ---
> drivers/net/ethernet/intel/ice/ice_lib.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c
> b/drivers/net/ethernet/intel/ice/ice_lib.c
> index a439b5a61a56..3f1b2158be59 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -2769,16 +2769,16 @@ void ice_dis_vsi(struct ice_vsi *vsi, bool
> locked)
> * @vsi: VSI pointer
> *
> * Associate queue[s] with napi for all vectors.
> - * The caller must hold rtnl_lock.
> */
> void ice_vsi_set_napi_queues(struct ice_vsi *vsi) {
> struct net_device *netdev = vsi->netdev;
> int q_idx, v_idx;
>
> if (!netdev)
> return;
>
> + ASSERT_RTNL();
> ice_for_each_rxq(vsi, q_idx)
> netif_queue_set_napi(netdev, q_idx,
> NETDEV_QUEUE_TYPE_RX,
> &vsi->rx_rings[q_idx]->q_vector-
> >napi);
> @@ -2799,16 +2799,16 @@ void ice_vsi_set_napi_queues(struct ice_vsi
> *vsi)
> * @vsi: VSI pointer
> *
> * Clear the association between all VSI queues queue[s] and napi.
> - * The caller must hold rtnl_lock.
> */
> void ice_vsi_clear_napi_queues(struct ice_vsi *vsi) {
> struct net_device *netdev = vsi->netdev;
> int q_idx, v_idx;
>
> if (!netdev)
> return;
>
> + ASSERT_RTNL();
> /* Clear the NAPI's interrupt number */
> ice_for_each_q_vector(vsi, v_idx) {
> struct ice_q_vector *q_vector = vsi->q_vectors[v_idx];
> --
> 2.39.3
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
Powered by blists - more mailing lists