• H
    net: hns3: replace macro HNS3_MAX_NON_TSO_BD_NUM · fd665b3d
    Huazhong Tan 提交于
    Currently, the driver is able to query the device's specifications,
    which includes the maximum BD number of non TSO packet, so replace
    macro HNS3_MAX_NON_TSO_BD_NUM with the queried value, and rewrite
    macro HNS3_MAX_NON_TSO_SIZE whose value depends on the the maximum
    BD number of non TSO packet.
    
    Also, add a new parameter max_non_tso_bd_num to function
    hns3_tx_bd_num() and hns3_skb_need_linearized(), then they can get
    the maximum BD number of non TSO packet from the caller instead of
    calculating by themself, The note of hns3_skb_need_linearized()
    should be update as well.
    Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    fd665b3d
hns3_enet.h 15.1 KB