net/i40e: fix jumbo frame Rx with X722

For NIC I40E_10G-10G_BASE_T_X722, when the port is configured with
link speed, it cannot receive jumbo frame packets.

Because it set maximum frame size failed when starts the port that
the port link status is still down.

This patch fix the error that starts the port will force set maximum
frame size.

Fixes: 2184f7cdee ("net/i40e: fix max frame size config at port level")
Cc: stable@dpdk.org

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Tested-by: Dukai Yuan <dukaix.yuan@intel.com>
This commit is contained in:
Jie Wang 2022-11-10 11:45:24 +08:00 committed by Qi Zhang
parent e50a35edbe
commit 719469f13b

View File

@ -12132,8 +12132,13 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size)
enum i40e_status_code status;
bool can_be_set = true;
/* I40E_MEDIA_TYPE_BASET link up can be ignored */
if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET) {
/*
* I40E_MEDIA_TYPE_BASET link up can be ignored
* I40E_MEDIA_TYPE_BASET link down that hw->phy.media_type
* is I40E_MEDIA_TYPE_UNKNOWN
*/
if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET &&
hw->phy.media_type != I40E_MEDIA_TYPE_UNKNOWN) {
do {
update_link_reg(hw, &link);
if (link.link_status)