Message ID | 20210810025140.1698163-11-qi.z.zhang@intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Qi Zhang |
Headers | show |
Series | ice: base code update | expand |
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
> -----Original Message----- > From: Zhang, Qi Z <qi.z.zhang@intel.com> > Sent: Tuesday, August 10, 2021 10:51 > To: Yang, Qiming <qiming.yang@intel.com> > Cc: Guo, Junfeng <junfeng.guo@intel.com>; dev@dpdk.org; Zhang, Qi Z > <qi.z.zhang@intel.com>; Nguyen, Anthony L > <anthony.l.nguyen@intel.com> > Subject: [PATCH 10/28] net/ice/base: clarify comments on checking PFC > mode > > Rework the comment around checking PFC mode to make it clear why we > are > checking the mode after sending the command. > > Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> > --- > drivers/net/ice/base/ice_dcb.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > -- > 2.26.2 Acked-by: Junfeng Guo <junfeng.guo@intel.com> Regards, Junfeng Guo
diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c index 9c9675f6ef..cb6c5ba182 100644 --- a/drivers/net/ice/base/ice_dcb.c +++ b/drivers/net/ice/base/ice_dcb.c @@ -764,11 +764,10 @@ ice_aq_set_pfc_mode(struct ice_hw *hw, u8 pfc_mode, struct ice_sq_cd *cd) if (status) return status; - /* The spec isn't clear about whether the FW will return an error code - * if the PFC mode requested by the driver was not set. The spec just - * says that the FW will write the PFC mode set back into cmd->pfc_mode, - * so after the AQ has been executed, check if cmd->pfc_mode is what was - * requested. + /* FW will write the PFC mode set back into cmd->pfc_mode, but if DCB is + * disabled, FW will write back 0 to cmd->pfc_mode. After the AQ has + * been executed, check if cmd->pfc_mode is what was requested. If not, + * return an error. */ if (cmd->pfc_mode != pfc_mode) return ICE_ERR_NOT_SUPPORTED;