• Maor Gottlieb's avatar
    IB/uverbs: Add support to extend flow steering specifications · 15dfbd6b
    Maor Gottlieb authored
    Flow steering specifications structures were implemented as in an
    extensible way that allows one to add new filters and new fields
    to existing filters.
    These specifications have never been extended, therefore the
    kernel flow specifications size and the user flow specifications size
    were must to be equal.
    
    In downstream patch, the IPv4 flow specifications type is extended to
    support TOS and TTL fields.
    
    To support an extension we change the flow specifications size
    condition test to be as following:
    
    * If the user flow specifications is bigger than the kernel
    specifications, we verify that all the bits which not in the kernel
    specifications are zeros and the flow is added only with the kernel
    specifications fields.
    
    * Otherwise, we add flow rule only with the user specifications fields.
    
    User space filters must be aligned with 32bits.
    Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
    Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    15dfbd6b
uverbs_cmd.c 102 KB