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 <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ido Schimmel 2022-04-07 10:35:29 +03:00 committed by David S. Miller
parent a9c64939b6
commit ee367d44b9

View File

@ -824,6 +824,7 @@ static int tcf_tunnel_key_offload_act_setup(struct tc_action *act,
} else if (is_tcf_tunnel_release(act)) { } else if (is_tcf_tunnel_release(act)) {
entry->id = FLOW_ACTION_TUNNEL_DECAP; entry->id = FLOW_ACTION_TUNNEL_DECAP;
} else { } else {
NL_SET_ERR_MSG_MOD(extack, "Unsupported tunnel key mode offload");
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
*index_inc = 1; *index_inc = 1;