• Rahul Lakkireddy's avatar
    cxgb4: rework TC filter rule insertion across regions · 8d174351
    Rahul Lakkireddy authored
    Chelsio NICs have 3 filter regions, in following order of priority:
    1. High Priority (HPFILTER) region (Highest Priority).
    2. HASH region.
    3. Normal FILTER region (Lowest Priority).
    
    Currently, there's a 1-to-1 mapping between the prio value passed
    by TC and the filter region index. However, it's possible to have
    multiple TC rules with the same prio value. In this case, if a region
    is exhausted, no attempt is made to try inserting the rule in the
    next available region.
    
    So, rework and remove the 1-to-1 mapping. Instead, dynamically select
    the region to insert the filter rule, as long as the new rule's prio
    value doesn't conflict with existing rules across all the 3 regions.
    Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8d174351
cxgb4_tc_flower.c 24.6 KB