• Fuyun Liang's avatar
    net: hns3: fix for setting MTU · 2866ccb2
    Fuyun Liang authored
    When setting MTU, actually what we do is configuring the max frame size
    for the hardware. ETH_HLEN、ETH_FCS_LEN and VLAN_HLEN must need to be
    considered. And the frame size which is less than the default value
    should not be set to the hardware. Because in the hardware, the the max
    frame size not only controls the RX packet size, but also controls the
    TX packet size. the RX packets whose size are greater than the setting
    value will be dropped.
    
    This patch fixes the bug setting a error max frame size to hardware.
    
    Fixes: 46a3df9f ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
    Signed-off-by: default avatarFuyun Liang <liangfuyun1@huawei.com>
    Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2866ccb2
hclge_main.h 15.9 KB