• lipeng's avatar
    net: hns: Fix to adjust buf_size of ring according to mtu · b29bd412
    lipeng authored
    Because buf_size of ring set to 2048, the process of rx_poll_one
    can reuse the page, therefore the performance of XGE can improve.
    But the chip only supports three bds in one package, so the max mtu
    is 6K when it sets to 2048. For better performane in litter mtu, we
    need change buf_size according to mtu.
    
    When user change mtu, hns is only change the desc in memory. There
    are some desc has been fetched by the chip, these desc can not be
    changed by the code. So it needs set the port loopback and send
    some packages to let the chip consumes the wrong desc and fetch new
    desc.
    Because the Pv660 do not support rss indirection, we need add version
    check in mtu change process.
    Signed-off-by: default avatarlipeng <lipeng321@huawei.com>
    reviewed-by: default avatarYisen Zhuang <yisen.zhuang@huawei.com>
    Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b29bd412
hns_ae_adapt.c 24 KB