• Ariel Levkovich's avatar
    net/mlx5e: Avoid checking offload capability in post_parse action · 0e322efd
    Ariel Levkovich authored
    During TC action parsing, the can_offload callback is called
    before calling the action's main parsing callback.
    
    Later on, the can_offload callback is called again before handling
    the action's post_parse callback if exists.
    
    Since the main parsing callback might have changed and set parsing
    params for the rule, following can_offload checks might fail because
    some parsing params were already set.
    
    Specifically, the ct action main parsing sets the ct param in the
    parsing status structure and when the second can_offload for ct action
    is called, before handling the ct post parsing, it will return an error
    since it checks this ct param to indicate multiple ct actions which are
    not supported.
    
    Therefore, the can_offload call is removed from the post parsing
    handling to prevent such cases.
    This is allowed since the first can_offload call will ensure that the
    action can be offloaded and the fact the code reached the post parsing
    handling already means that the action can be offloaded.
    
    Fixes: 8300f225 ("net/mlx5e: Create new flow attr for multi table actions")
    Signed-off-by: default avatarAriel Levkovich <lariel@nvidia.com>
    Reviewed-by: default avatarPaul Blakey <paulb@nvidia.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
    0e322efd
act.c 4.75 KB