• Sathya Perla's avatar
    bnxt_en: add support for Flower based vxlan encap/decap offload · 8c95f773
    Sathya Perla authored
    This patch adds IPv4 vxlan encap/decap action support to TC-flower
    offload.
    
    For vxlan encap, the driver maintains a tunnel encap hash-table.
    When a new flow with a tunnel encap action arrives, this table
    is looked up; if an encap entry exists, it uses the already
    programmed encap_record_handle as the tunnel_handle in the
    hwrm_cfa_flow_alloc cmd. Else, a new encap node is added and the
    L2 header fields are queried via a route lookup.
    hwrm_cfa_encap_record_alloc cmd is used to create a new encap
    record and the encap_record_handle is used as the tunnel_handle
    while adding the flow.
    
    For vxlan decap, the driver maintains a tunnel decap hash-table.
    When a new flow with a tunnel decap action arrives, this table
    is looked up; if a decap entry exists, it uses the already
    programmed decap_filter_handle as the tunnel_handle in the
    hwrm_cfa_flow_alloc cmd. Else, a new decap node is added and
    a decap_filter_handle is alloc'd via the hwrm_cfa_decap_filter_alloc
    cmd. This handle is used as the tunnel_handle while adding the flow.
    
    The code to issue the HWRM FW cmds is introduced in a follow-up patch.
    Signed-off-by: default avatarSathya Perla <sathya.perla@broadcom.com>
    Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8c95f773
bnxt_devlink.c 1.43 KB