• H
    net: hns3: support RXD advanced layout · 79664077
    Huazhong Tan 提交于
    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: NHuazhong Tan <tanhuazhong@huawei.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    79664077
hclge_cmd.c 15.7 KB