[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y80t9Q8699GV8ejm@unreal>
Date: Sun, 22 Jan 2023 14:37:09 +0200
From: Leon Romanovsky <leonro@...dia.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
CC: <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
<edumazet@...gle.com>, Dave Ertman <david.m.ertman@...el.com>,
<netdev@...r.kernel.org>,
Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
Gurucharan G <gurucharanx.g@...el.com>
Subject: Re: [PATCH net v3 1/2] ice: Prevent set_channel from changing queues
while RDMA active
On Fri, Jan 20, 2023 at 01:12:30PM -0800, Tony Nguyen wrote:
> From: Dave Ertman <david.m.ertman@...el.com>
>
> The PF controls the set of queues that the RDMA auxiliary_driver requests
> resources from. The set_channel command will alter that pool and trigger a
> reconfiguration of the VSI, which breaks RDMA functionality.
>
> Prevent set_channel from executing when RDMA driver bound to auxiliary
> device.
>
> Fixes: 348048e724a0 ("ice: Implement iidc operations")
> Co-developed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> Signed-off-by: Dave Ertman <david.m.ertman@...el.com>
> Tested-by: Gurucharan G <gurucharanx.g@...el.com> (A Contingent worker at Intel)
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> ---
> drivers/net/ethernet/intel/ice/ice_ethtool.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> index 4191994d8f3a..16006eedfceb 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -3705,6 +3705,14 @@ static int ice_set_channels(struct net_device *dev, struct ethtool_channels *ch)
> return -EINVAL;
> }
>
> + mutex_lock(&pf->adev_mutex);
> + if (pf->adev && pf->adev->dev.driver) {
adev_mutex protects pf->adev, but not .driver, isn't it?
> + netdev_err(dev, "Cannot change channels when RDMA is active\n");
> + mutex_unlock(&pf->adev_mutex);
> + return -EINVAL;
> + }
> + mutex_unlock(&pf->adev_mutex);
> +
> ice_vsi_recfg_qs(vsi, new_rx, new_tx);
>
> if (!netif_is_rxfh_configured(dev))
> --
> 2.38.1
>
Powered by blists - more mailing lists