lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 3 Feb 2021 16:56:52 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Huazhong Tan <tanhuazhong@...wei.com>
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 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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ