• Ido Schimmel's avatar
    net/sched: act_mpls: Add extack messages for offload failure · bca3821d
    Ido Schimmel authored
    For better error reporting to user space, add extack messages when mpls
    action offload fails.
    
    Example:
    
     # echo 1 > /sys/kernel/tracing/events/netlink/netlink_extack/enable
    
     # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action mpls dec_ttl
     Error: cls_matchall: Failed to setup flow action.
     We have an error talking to the kernel
    
     # cat /sys/kernel/tracing/trace_pipe
           tc-182     [000] b..1.    18.693915: netlink_extack: msg=act_mpls: Offload not supported when "dec_ttl" option is used
           tc-182     [000] .....    18.693921: netlink_extack: msg=cls_matchall: Failed to setup flow action
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    bca3821d
act_mpls.c 12.9 KB