patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Zhang, Yuying" <yuying.zhang@intel.com>
To: "Wu, WenxuanX" <wenxuanx.wu@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Zhou, YidingX" <yidingx.zhou@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH v2] net/i40e: fix max frame size config at port level
Date: Fri, 13 May 2022 06:27:15 +0000	[thread overview]
Message-ID: <DM6PR11MB35161E9BC0A7225F8F571B668ECA9@DM6PR11MB3516.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220511040447.64272-1-wenxuanx.wu@intel.com>

Hi Wenxuan,

> -----Original Message-----
> From: Wu, WenxuanX <wenxuanx.wu@intel.com>
> Sent: Wednesday, May 11, 2022 12:05 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Yuying
> <yuying.zhang@intel.com>; dev@dpdk.org
> Cc: Wu, WenxuanX <wenxuanx.wu@intel.com>; Zhou, YidingX
> <yidingx.zhou@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/i40e: fix max frame size config at port level
> 
> From: Wenxuan Wu <wenxuanx.wu@intel.com>
> 
> Previously, max frame size can only be set when link is up, and the wait time
> is 1 sec. For media type of I40E_10G_BASET would consume longer time
> which is too short to up would result in error.

Above sentence lacks of subject. 
"This time is too short for some media types such as I40E_10G_BASET to uplink
which results in error."

> 
> Acctually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set
> regardless of link status.
> 
> This patch omitted the status check of 10G_MEDIA_TYPE_BASET.
> 
> Fixes: a4ba77367923 ("net/i40e: enable maximum frame size at port level")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c | 32 +++++++++++++++++---------------
>  1 file changed, 17 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 755786dc10..383e9a542e 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -12102,23 +12102,25 @@ i40e_set_mac_max_frame(struct rte_eth_dev
> *dev, uint16_t size)
>  	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data-
> >dev_private);
>  	uint32_t rep_cnt = MAX_REPEAT_TIME;
>  	struct rte_eth_link link;
> -	enum i40e_status_code status;
> -
> -	do {
> -		update_link_reg(hw, &link);
> -		if (link.link_status)
> -			break;
> -
> -		rte_delay_ms(CHECK_INTERVAL);
> -	} while (--rep_cnt);
> +	enum i40e_status_code status = I40E_ERR_DEVICE_NOT_SUPPORTED;
> +	bool can_be_set = true;
> +
> +	/* I40E_MEDIA_TYPE_BASET link up can be ignored */
> +	if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET) {
> +		do {
> +			update_link_reg(hw, &link);
> +			if (link.link_status)
> +				break;
> +			rte_delay_ms(CHECK_INTERVAL);
> +		} while (--rep_cnt);
> +		can_be_set = link.link_status != 0;
> +	}
> 
> -	if (link.link_status) {
> +	if (can_be_set)
>  		status = i40e_aq_set_mac_config(hw, size, TRUE, 0, false,
> NULL);
> -		if (status != I40E_SUCCESS)
> -			PMD_DRV_LOG(ERR, "Failed to set max frame size at
> port level");
> -	} else {
> -		PMD_DRV_LOG(ERR, "Set max frame size at port level not
> applicable on link down");

You can reserve above LOG to reduce the change of other types.

> -	}
> +
> +	if (status != I40E_SUCCESS)
> +		PMD_DRV_LOG(ERR, "Failed to set max frame size at port
> level");
>  }
> 
>  RTE_LOG_REGISTER_SUFFIX(i40e_logtype_init, init, NOTICE);
> --
> 2.25.1


  reply	other threads:[~2022-05-13  6:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 11:12 [PATCH] net/i40e: fix max frmame " wenxuanx.wu
2022-05-11  1:56 ` [PATCH v2] net/i40e: fix max frame " wenxuanx.wu
2022-05-11  4:04 ` wenxuanx.wu
2022-05-13  6:27   ` Zhang, Yuying [this message]
2022-05-13  7:20 ` [PATCH v3] " wenxuanx.wu
2022-05-17 14:40   ` Zhang, Yuying
2022-05-18  7:31     ` Wu, WenxuanX
2022-05-19  1:05       ` Zhang, Yuying
2022-05-18  4:49   ` [PATCH v4] " wenxuanx.wu
2022-05-18  4:59   ` wenxuanx.wu
2022-05-19  5:22     ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB35161E9BC0A7225F8F571B668ECA9@DM6PR11MB3516.namprd11.prod.outlook.com \
    --to=yuying.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=wenxuanx.wu@intel.com \
    --cc=yidingx.zhou@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).