Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
Commit Message
Burakov, Anatoly
June 12, 2024, 3:02 p.m. UTC
From: Ian Stokes <ian.stokes@intel.com> In the adminq command query port ETS function, the root node teid is needed. However, for DCF, the root node is not initialized at parent HW init stage, which will cause error when we refer to the variable. In this patch, we will check whether the root node is available or not first. If not available in DCF case, after receiving virtchnl message, PF will add the root node info before sending adminq command to FW. Signed-off-by: Ting Xu <ting.xu@intel.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com> --- drivers/net/ice/base/ice_dcb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Comments
On Wed, Jun 12, 2024 at 04:02:11PM +0100, Anatoly Burakov wrote: > From: Ian Stokes <ian.stokes@intel.com> > > In the adminq command query port ETS function, the root node teid is > needed. However, for DCF, the root node is not initialized at parent HW > init stage, which will cause error when we refer to the variable. In > this patch, we will check whether the root node is available or not first. > If not available in DCF case, after receiving virtchnl message, PF will > add the root node info before sending adminq command to FW. > > Signed-off-by: Ting Xu <ting.xu@intel.com> > Signed-off-by: Ian Stokes <ian.stokes@intel.com> > --- Validation has thrown up some issues with this change when used with our DCF driver, so this patch should be dropped from the patchset for 24.07. /Bruce > drivers/net/ice/base/ice_dcb.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c > index 4ef54613b1..81ce11343d 100644 > --- a/drivers/net/ice/base/ice_dcb.c > +++ b/drivers/net/ice/base/ice_dcb.c > @@ -1559,12 +1559,11 @@ ice_aq_query_port_ets(struct ice_port_info *pi, > struct ice_aq_desc desc; > int status; > > - if (!pi) > + if (!pi || !pi->root) > return ICE_ERR_PARAM; > cmd = &desc.params.port_ets; > ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_query_port_ets); > - if (pi->root) > - cmd->port_teid = pi->root->info.node_teid; > + cmd->port_teid = pi->root->info.node_teid; > > status = ice_aq_send_cmd(pi->hw, &desc, buf, buf_size, cd); > return status; > -- > 2.43.0 >
diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c index 4ef54613b1..81ce11343d 100644 --- a/drivers/net/ice/base/ice_dcb.c +++ b/drivers/net/ice/base/ice_dcb.c @@ -1559,12 +1559,11 @@ ice_aq_query_port_ets(struct ice_port_info *pi, struct ice_aq_desc desc; int status; - if (!pi) + if (!pi || !pi->root) return ICE_ERR_PARAM; cmd = &desc.params.port_ets; ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_query_port_ets); - if (pi->root) - cmd->port_teid = pi->root->info.node_teid; + cmd->port_teid = pi->root->info.node_teid; status = ice_aq_send_cmd(pi->hw, &desc, buf, buf_size, cd); return status;