• Rahul Lakkireddy's avatar
    cxgb4: check rule prio conflicts before offload · 41ec03e5
    Rahul Lakkireddy authored
    Only offload rule if it satisfies both of the following conditions:
    1. The immediate previous rule has priority <= current rule's priority.
    2. The immediate next rule has priority >= current rule's priority.
    
    Also rework free entry fetch logic to search from end of TCAM, instead
    of beginning, because higher indices have lower priority than lower
    indices. This is similar to how TC auto generates priority values.
    
    v5:
    - Fixed commit message and comment to include comparison for equal
      priority.
    
    v4:
    - Patch added in this version.
    Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    41ec03e5
cxgb4_filter.c 53.3 KB