Hi, steve

> -----Original Message-----
> From: Yang, SteveX <stevex.y...@intel.com>
> Sent: Tuesday, September 8, 2020 11:17 AM
> To: dev@dpdk.org
> Cc: Zhao1, Wei <wei.zh...@intel.com>; Guo, Jia <jia....@intel.com>; Yang,
> Qiming <qiming.y...@intel.com>; Yang, SteveX <stevex.y...@intel.com>
> Subject: [PATCH v2] net/ixgbe: fix vf reset hw error handling
> 
> The PF control message will interrupt the assigning MAC address for VF when
> PF physical link down, and the VF reset operation returns the
> IXGBE_ERR_INVALID_MAC_ADDR. In this case, reuse the MAC address when
> device initialization insteads of waiting PF reassign.
> 

This commit log is not very clear and readable. I think as qiming said before, 
such as below should be enough, 
"When start a VF with no initial MAC address assigned by the underlying Host PF 
driver, just reuse the MAC address assigned when VF is initializing."

> Fixes: f69166c9a3c9 ("net/ixgbe: fix reset error handling")
> 
> Signed-off-by: SteveX Yang <stevex.y...@intel.com>
> ---
> v2:
> update comment.
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index fd0cb9b0e..c2fa59c73 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -5326,10 +5326,17 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
>       ixgbe_dev_wait_setup_link_complete(dev, 0);
> 
>       err = hw->mac.ops.reset_hw(hw);
> -     if (err) {
> +
> +     /*

Please use /** at the first line.

> +      * The VF reset operation returns the
> IXGBE_ERR_INVALID_MAC_ADDR when
> +      * the underlying PF driver has not assigned a MAC address to the VF.
> +      * In this case, reuses the MAC address from eth_ixgbevf_dev_init().
> +      */

"In this case, reuses the MAC address assigned by VF initialization.", please 
ref.

> +     if (err != IXGBE_SUCCESS && err !=
> IXGBE_ERR_INVALID_MAC_ADDR) {
>               PMD_INIT_LOG(ERR, "Unable to reset vf hardware (%d)",
> err);
>               return err;
>       }
> +
>       hw->mac.get_link_status = true;
> 
>       /* negotiate mailbox API version to use with the PF. */
> --
> 2.17.1

Reply via email to