[PATCH v5] net/i40e: rework maximum frame size configuration

David Marchand david.marchand at redhat.com
Thu Feb 2 14:24:14 CET 2023


On Thu, Feb 2, 2023 at 1:37 PM Simei Su <simei.su at intel.com> wrote:
> @@ -2467,8 +2466,16 @@ i40e_dev_start(struct rte_eth_dev *dev)
>                             "please call hierarchy_commit() "
>                             "before starting the port");
>
> -       max_frame_size = dev->data->mtu + I40E_ETH_OVERHEAD;
> -       i40e_set_mac_max_frame(dev, max_frame_size);
> +       max_frame_size = dev->data->mtu ?
> +               dev->data->mtu + I40E_ETH_OVERHEAD :
> +               I40E_FRAME_SIZE_MAX;
> +
> +       /* Set the max frame size to HW*/
> +       ret = i40e_aq_set_mac_config(hw, max_frame_size, TRUE, false, 0, NULL);
> +       if (ret) {
> +               PMD_DRV_LOG(ERR, "Fail to set mac config");
> +               return ret;
> +       }

Reading this patch again.

Returning here seems incorrect as we leave rx/tx queue in started state.
Don't we need to jump to tx_err label on error?

>
>         return I40E_SUCCESS;
>

-- 
David Marchand



More information about the stable mailing list