* [PATCH iwl-next v2] ice: Block PF reinit if attached to bond
@ 2023-11-13 23:58 Sachin Bahadur
2023-11-15 17:42 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Sachin Bahadur @ 2023-11-13 23:58 UTC (permalink / raw)
To: intel-wired-lan; +Cc: netdev
PF interface part of LAG should not allow driver reinit via devlink. The
Bond config will be lost due to driver reinit. ice_devlink_reload_down is
called before PF driver reinit. If PF is attached to bond,
ice_devlink_reload_down returns error.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Sachin Bahadur <sachin.bahadur@intel.com>
---
drivers/net/ethernet/intel/ice/ice_devlink.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c
index f4e24d11ebd0..5fe88e949b09 100644
--- a/drivers/net/ethernet/intel/ice/ice_devlink.c
+++ b/drivers/net/ethernet/intel/ice/ice_devlink.c
@@ -457,6 +457,10 @@ ice_devlink_reload_down(struct devlink *devlink, bool netns_change,
"Remove all VFs before doing reinit\n");
return -EOPNOTSUPP;
}
+ if (pf->lag && pf->lag->bonded) {
+ NL_SET_ERR_MSG_MOD(extack, "Remove all associated Bonds before doing reinit");
+ return -EBUSY;
+ }
ice_unload(pf);
return 0;
case DEVLINK_RELOAD_ACTION_FW_ACTIVATE:
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iwl-next v2] ice: Block PF reinit if attached to bond
2023-11-13 23:58 [PATCH iwl-next v2] ice: Block PF reinit if attached to bond Sachin Bahadur
@ 2023-11-15 17:42 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2023-11-15 17:42 UTC (permalink / raw)
To: Sachin Bahadur; +Cc: intel-wired-lan, netdev
On Mon, Nov 13, 2023 at 03:58:56PM -0800, Sachin Bahadur wrote:
> PF interface part of LAG should not allow driver reinit via devlink. The
> Bond config will be lost due to driver reinit. ice_devlink_reload_down is
> called before PF driver reinit. If PF is attached to bond,
> ice_devlink_reload_down returns error.
>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Signed-off-by: Sachin Bahadur <sachin.bahadur@intel.com>
Hi Sachin,
I wonder if this should have a Fixes tag and be targeted at iwl-net.
It does feel like a bug from the description, but I could be wrong.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-15 17:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-13 23:58 [PATCH iwl-next v2] ice: Block PF reinit if attached to bond Sachin Bahadur
2023-11-15 17:42 ` Simon Horman
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).