From: Ido Schimmel Date: Thu, 7 Apr 2022 07:35:29 +0000 (+0300) Subject: net/sched: act_tunnel_key: Add extack message for offload failure X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ee367d44b93664feaeea739c1324e914817be6f5;p=linux.git net/sched: act_tunnel_key: Add extack message for offload failure For better error reporting to user space, add an extack message when tunnel_key action offload fails. Currently, the failure cannot be triggered, but add a message in case the action is extended in the future to support more than set/release modes. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller --- diff --git a/net/sched/act_tunnel_key.c b/net/sched/act_tunnel_key.c index 3c6f40478c81..856dc23cef8c 100644 --- a/net/sched/act_tunnel_key.c +++ b/net/sched/act_tunnel_key.c @@ -824,6 +824,7 @@ static int tcf_tunnel_key_offload_act_setup(struct tc_action *act, } else if (is_tcf_tunnel_release(act)) { entry->id = FLOW_ACTION_TUNNEL_DECAP; } else { + NL_SET_ERR_MSG_MOD(extack, "Unsupported tunnel key mode offload"); return -EOPNOTSUPP; } *index_inc = 1;