• Huazhong Tan's avatar
    net: hns3: support RXD advanced layout · 79664077
    Huazhong Tan authored
    Currently, the driver gets packet type by parsing the
    L3_ID/L4_ID/OL3_ID/OL4_ID from RX descriptor, it's
    time-consuming.
    
    Now some new devices support RXD advanced layout, which combines
    previous OL3_ID/OL4_ID to 8bit ptype field, so the driver gets
    packet type by looking up only one table, and L3_ID/L4_ID become
    reserved fields.
    
    Considering compatibility, the firmware will report capability of
    RXD advanced layout, the driver will identify and enable it by
    default. This patch provides basic function: identify and enable
    the RXD advanced layout, and refactor out hns3_rx_checksum() by
    using ptype table to handle RX checksum if supported.
    Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    79664077
hclgevf_main.h 9.97 KB