• Gal Pressman's avatar
    net/mlx5e: Improve set features ndo resiliency · 0e405443
    Gal Pressman authored
    In current mlx5e ndo_set_features implementation, setting some features
    can success while others can fail. Today, we return one error code which
    doesn't reflect the current features status of the netdev at the end of
    the ndo callback.
    
    Set netdev->features with features which were successfully set in order
    to keep the current status in case of failure. For this purpose, define
    new Macro to set/unset specific feature in netdev->features.
    
    This patch introduces a mechanism that uses feature handlers for each
    feature.
    Set features will call a generic handler, which will then call a specific
    handler in his turn and update netdev->features according to it's return
    value. Each specific handler is responsible to perform driver specific
    actions, and updating params if needed.
    Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0e405443
en_main.c 70.8 KB