• Kumar Sanghvi's avatar
    cxgb4: add support to create hash filters · 12b276fb
    Kumar Sanghvi authored
    Add support to create hash (exact-match) filters based on the value
    of 'hash' field in ch_filter_specification.
    
    Allocate SMT/L2T entries if DMAC-rewrite/SMAC-rewrite is requested.
    
    Allocate CLIP entry in case of IPv6 filter.
    
    Use cpl_act_open_req[6] to send hash filter create request to hw.
    Also, the filter tuple is calculated as part of sending this request.
    
    Hash-filter reply is processed on getting cpl_act_open_rpl.
    In case of success, various bits/fields in filter-tcb are set per
    filter requirement, such as enabling filter hitcnts, and/or various
    header rewrite operations, such as VLAN-rewrite, NAT or
    (L3/L4)-rewrite, and SMAC/DMAC-rewrite. In case of failure, clear the
    filter entry and release any hw resources occupied by it.
    
    The patch also moves the functions set_tcb_field, set_tcb_tflag and
    configure_filter_smac towards beginning of file.
    Signed-off-by: default avatarKumar Sanghvi <kumaras@chelsio.com>
    Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
    Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    12b276fb
cxgb4_filter.h 2.07 KB