• Paul Blakey's avatar
    cls_flower: Support multiple masks per priority · 05cd271f
    Paul Blakey authored
    Currently flower doesn't support inserting filters with different masks
    on a single priority, even if the actual flows (key + mask) inserted
    aren't overlapping, as with the use case of offloading openvswitch
    datapath flows. Instead one must go up one level, and assign different
    priorities for each mask, which will create a different flower
    instances.
    
    This patch opens flower to support more than one mask per priority,
    and a single flower instance. It does so by adding another hash table
    on top of the existing one which will store the different masks,
    and the filters that share it.
    
    The user is left with the responsibility of ensuring non overlapping
    flows, otherwise precedence is not guaranteed.
    Signed-off-by: default avatarPaul Blakey <paulb@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    05cd271f
cls_flower.c 43.1 KB