[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <22dd6297-8a08-4271-84a1-7198227278dc@yunsilicon.com>
Date: Fri, 20 Dec 2024 15:07:07 +0800
From: "tianx" <tianx@...silicon.com>
To: "Andrew Lunn" <andrew@...n.ch>
Cc: <netdev@...r.kernel.org>, <andrew+netdev@...n.ch>, <kuba@...nel.org>,
<pabeni@...hat.com>, <edumazet@...gle.com>, <davem@...emloft.net>,
<jeff.johnson@....qualcomm.com>, <przemyslaw.kitszel@...el.com>,
<weihg@...silicon.com>, <wanry@...silicon.com>
Subject: Re: [PATCH v1 16/16] net-next/yunsilicon: Add change mtu
You’re right, the check is redundant. However, as per Jakub’s suggestion
to reduce the patch count, this patch will be excluded in the next
version. I'll address it locally and submit in a future update.
Thank you for pointing that out!
On 2024/12/19 2:31, Andrew Lunn wrote:
>> +static int xsc_eth_change_mtu(struct net_device *netdev, int new_mtu)
>> +{
>> + struct xsc_adapter *adapter = netdev_priv(netdev);
>> + int old_mtu = netdev->mtu;
>> + int ret = 0;
>> + int max_buf_len = 0;
>> +
>> + if (new_mtu > netdev->max_mtu || new_mtu < netdev->min_mtu) {
>> + netdev_err(netdev, "%s: Bad MTU (%d), valid range is: [%d..%d]\n",
>> + __func__, new_mtu, netdev->min_mtu, netdev->max_mtu);
>> + return -EINVAL;
>> + }
> What checking does the core do for you, now that you have set max_mtu
> and min_mtu?
>
>
> Andrew
>
> ---
> pw-bot: cr
Powered by blists - more mailing lists