• Ido Schimmel's avatar
    net/sched: act_skbedit: Add extack messages for offload failure · a9c64939
    Ido Schimmel authored
    For better error reporting to user space, add extack messages when
    skbedit 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 skbedit queue_mapping 1234
     Error: cls_matchall: Failed to setup flow action.
     We have an error talking to the kernel
    
     # cat /sys/kernel/tracing/trace_pipe
           tc-185     [002] b..1.    31.802414: netlink_extack: msg=act_skbedit: Offload not supported when "queue_mapping" option is used
           tc-185     [002] .....    31.802418: netlink_extack: msg=cls_matchall: Failed to setup flow action
    
     # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action skbedit inheritdsfield
     Error: cls_matchall: Failed to setup flow action.
     We have an error talking to the kernel
    
     # cat /sys/kernel/tracing/trace_pipe
           tc-187     [002] b..1.    45.985145: netlink_extack: msg=act_skbedit: Offload not supported when "inheritdsfield" option is used
           tc-187     [002] .....    45.985160: 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>
    a9c64939
act_skbedit.c 11.6 KB