* [PATCH net] ice: Fix RDMA VSI removal during queue rebuild
@ 2023-07-28 17:12 Tony Nguyen
2023-07-30 13:21 ` Leon Romanovsky
2023-07-31 21:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Tony Nguyen @ 2023-07-28 17:12 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, netdev
Cc: Rafal Rogalski, anthony.l.nguyen, david.m.ertman, shiraz.saleem,
mustafa.ismail, jgg, leonro, linux-rdma, Mateusz Palczewski,
Kamil Maziarz, Bharathi Sreenivas
From: Rafal Rogalski <rafalx.rogalski@intel.com>
During qdisc create/delete, it is necessary to rebuild the queue
of VSIs. An error occurred because the VSIs created by RDMA were
still active.
Added check if RDMA is active. If yes, it disallows qdisc changes
and writes a message in the system logs.
Fixes: 348048e724a0 ("ice: Implement iidc operations")
Signed-off-by: Rafal Rogalski <rafalx.rogalski@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Signed-off-by: Kamil Maziarz <kamil.maziarz@intel.com>
Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index f02d44455772..cf92c39467c8 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -8813,6 +8813,7 @@ ice_setup_tc(struct net_device *netdev, enum tc_setup_type type,
{
struct ice_netdev_priv *np = netdev_priv(netdev);
struct ice_pf *pf = np->vsi->back;
+ bool locked = false;
int err;
switch (type) {
@@ -8822,10 +8823,27 @@ ice_setup_tc(struct net_device *netdev, enum tc_setup_type type,
ice_setup_tc_block_cb,
np, np, true);
case TC_SETUP_QDISC_MQPRIO:
+ if (pf->adev) {
+ mutex_lock(&pf->adev_mutex);
+ device_lock(&pf->adev->dev);
+ locked = true;
+ if (pf->adev->dev.driver) {
+ netdev_err(netdev, "Cannot change qdisc when RDMA is active\n");
+ err = -EBUSY;
+ goto adev_unlock;
+ }
+ }
+
/* setup traffic classifier for receive side */
mutex_lock(&pf->tc_mutex);
err = ice_setup_tc_mqprio_qdisc(netdev, type_data);
mutex_unlock(&pf->tc_mutex);
+
+adev_unlock:
+ if (locked) {
+ device_unlock(&pf->adev->dev);
+ mutex_unlock(&pf->adev_mutex);
+ }
return err;
default:
return -EOPNOTSUPP;
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] ice: Fix RDMA VSI removal during queue rebuild
2023-07-28 17:12 [PATCH net] ice: Fix RDMA VSI removal during queue rebuild Tony Nguyen
@ 2023-07-30 13:21 ` Leon Romanovsky
2023-07-31 21:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2023-07-30 13:21 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, kuba, pabeni, edumazet, netdev, Rafal Rogalski,
david.m.ertman, shiraz.saleem, mustafa.ismail, jgg, linux-rdma,
Mateusz Palczewski, Kamil Maziarz, Bharathi Sreenivas
On Fri, Jul 28, 2023 at 10:12:43AM -0700, Tony Nguyen wrote:
> From: Rafal Rogalski <rafalx.rogalski@intel.com>
>
> During qdisc create/delete, it is necessary to rebuild the queue
> of VSIs. An error occurred because the VSIs created by RDMA were
> still active.
>
> Added check if RDMA is active. If yes, it disallows qdisc changes
> and writes a message in the system logs.
>
> Fixes: 348048e724a0 ("ice: Implement iidc operations")
> Signed-off-by: Rafal Rogalski <rafalx.rogalski@intel.com>
> Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
> Signed-off-by: Kamil Maziarz <kamil.maziarz@intel.com>
> Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] ice: Fix RDMA VSI removal during queue rebuild
2023-07-28 17:12 [PATCH net] ice: Fix RDMA VSI removal during queue rebuild Tony Nguyen
2023-07-30 13:21 ` Leon Romanovsky
@ 2023-07-31 21:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-07-31 21:30 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, kuba, pabeni, edumazet, netdev, rafalx.rogalski,
david.m.ertman, shiraz.saleem, mustafa.ismail, jgg, leonro,
linux-rdma, mateusz.palczewski, kamil.maziarz, bharathi.sreenivas
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 28 Jul 2023 10:12:43 -0700 you wrote:
> From: Rafal Rogalski <rafalx.rogalski@intel.com>
>
> During qdisc create/delete, it is necessary to rebuild the queue
> of VSIs. An error occurred because the VSIs created by RDMA were
> still active.
>
> Added check if RDMA is active. If yes, it disallows qdisc changes
> and writes a message in the system logs.
>
> [...]
Here is the summary with links:
- [net] ice: Fix RDMA VSI removal during queue rebuild
https://git.kernel.org/netdev/net/c/4b31fd4d77ff
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-31 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28 17:12 [PATCH net] ice: Fix RDMA VSI removal during queue rebuild Tony Nguyen
2023-07-30 13:21 ` Leon Romanovsky
2023-07-31 21:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).