Currently, the DCF requests the ACL flow engine unconditionally and
fails the whole probe if its initialisation fails. The PF driver can
legitimately refuse the ACL capability to a DCF and in that case it
silently drops every ACL AdminQ command instead of returning an error.
The DCF then times out on the ACL table allocation and probe fails,
even though the switch and RSS engines would have worked.
Fix it by treating an ACL engine initialisation failure as non-fatal
when running as DCF. Log a warning, mark the engine disabled and continue
initialising the remaining engines.
Fixes: 40d466fa9f76 ("net/ice: support ACL filter in DCF")
Cc: [email protected]
Signed-off-by: Ciara Loftus <[email protected]>
---
drivers/net/intel/ice/ice_dcf_parent.c | 2 ++
drivers/net/intel/ice/ice_generic_flow.c | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/drivers/net/intel/ice/ice_dcf_parent.c
b/drivers/net/intel/ice/ice_dcf_parent.c
index 4d620fe8f5a..39c88508ad3 100644
--- a/drivers/net/intel/ice/ice_dcf_parent.c
+++ b/drivers/net/intel/ice/ice_dcf_parent.c
@@ -497,6 +497,8 @@ ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev)
ice_dcf_update_vf_vsi_map(parent_hw, hw->num_vfs, hw->vf_vsi_map);
+ /* Retry ACL initialization after reset unless disabled by devargs. */
+ parent_adapter->disabled_engine_mask &= ~BIT(ICE_FLOW_ENGINE_ACL);
if (ice_devargs_check(eth_dev->device->devargs, ICE_DCF_DEVARG_ACL))
parent_adapter->disabled_engine_mask |=
BIT(ICE_FLOW_ENGINE_ACL);
diff --git a/drivers/net/intel/ice/ice_generic_flow.c
b/drivers/net/intel/ice/ice_generic_flow.c
index 1602691b1cc..6d8bf6a939d 100644
--- a/drivers/net/intel/ice/ice_generic_flow.c
+++ b/drivers/net/intel/ice/ice_generic_flow.c
@@ -2012,6 +2012,14 @@ ice_flow_init(struct ice_adapter *ad)
ret = engine->init(ad);
if (ret) {
+ /* The PF may refuse the ACL capability to a DCF. Run
without it. */
+ if (ad->hw.dcf_enabled && engine->type ==
ICE_FLOW_ENGINE_ACL) {
+ PMD_INIT_LOG(WARNING, "ACL engine not
available, disabling it");
+ if (engine->uninit)
+ engine->uninit(ad);
+ ad->disabled_engine_mask |=
BIT(ICE_FLOW_ENGINE_ACL);
+ continue;
+ }
PMD_INIT_LOG(ERR, "Failed to initialize engine %d",
engine->type);
return ret;
--
2.43.0