[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a3f8a43c-f4bf-1906-9bf3-bda23e921753@huawei.com>
Date: Thu, 4 Feb 2021 10:01:35 +0800
From: Huazhong Tan <tanhuazhong@...wei.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<salil.mehta@...wei.com>, <yisen.zhuang@...wei.com>,
<huangdaode@...wei.com>, <linuxarm@...neuler.org>,
Yufeng Mo <moyufeng@...wei.com>
Subject: Re: [PATCH net-next 4/7] net: hns3: add support for obtaining the
maximum frame length
On 2021/2/4 8:56, Jakub Kicinski wrote:
> On Tue, 2 Feb 2021 20:39:50 +0800 Huazhong Tan wrote:
>> From: Yufeng Mo <moyufeng@...wei.com>
>>
>> Since the newer hardware may supports different frame size,
>> so add support to obtain the capability from the firmware
>> instead of the fixed value.
>>
>> Signed-off-by: Yufeng Mo <moyufeng@...wei.com>
>> Signed-off-by: Huazhong Tan <tanhuazhong@...wei.com>
>> @@ -9659,7 +9663,7 @@ int hclge_set_vport_mtu(struct hclge_vport *vport, int new_mtu)
>> /* HW supprt 2 layer vlan */
>> max_frm_size = new_mtu + ETH_HLEN + ETH_FCS_LEN + 2 * VLAN_HLEN;
>> if (max_frm_size < HCLGE_MAC_MIN_FRAME ||
>> - max_frm_size > HCLGE_MAC_MAX_FRAME)
>> + max_frm_size > hdev->ae_dev->dev_specs.max_pkt_len)
>> return -EINVAL;
>>
>> max_frm_size = max(max_frm_size, HCLGE_MAC_DEFAULT_FRAME);
> Don't you have to adjust netdev->max_mtu as well when device specifies
> max_pkt_len different than HCLGE_MAC_MAX_FRAME?
netdev->max_mtu should be adjusted as well, will fix it.
thanks.
> .
Powered by blists - more mailing lists