• Ido Schimmel's avatar
    net/sched: cls_api: Add extack message for unsupported action offload · c440615f
    Ido Schimmel authored
    For better error reporting to user space, add an extack message when the
    requested action does not support offload.
    
    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 nat ingress 192.0.2.1 198.51.100.1
     Error: cls_matchall: Failed to setup flow action.
     We have an error talking to the kernel
    
     # cat /sys/kernel/tracing/trace_pipe
           tc-181     [000] b..1.    88.406093: netlink_extack: msg=Action does not support offload
           tc-181     [000] .....    88.406108: 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>
    c440615f
cls_api.c 91.5 KB