• F
    net: hns3: fix for setting MTU · 2866ccb2
    Fuyun Liang 提交于
    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: NFuyun Liang <liangfuyun1@huawei.com>
    Signed-off-by: NPeng Li <lipeng321@huawei.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    2866ccb2
hclge_main.c 142.7 KB