[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230120211231.431147-2-anthony.l.nguyen@intel.com>
Date: Fri, 20 Jan 2023 13:12:30 -0800
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com
Cc: Dave Ertman <david.m.ertman@...el.com>, netdev@...r.kernel.org,
anthony.l.nguyen@...el.com, leonro@...dia.com,
Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
Gurucharan G <gurucharanx.g@...el.com>
Subject: [PATCH net v3 1/2] ice: Prevent set_channel from changing queues while RDMA active
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) {
+ 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