summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteen Hegelund <steen.hegelund@microchip.com>2023-01-27 14:08:25 +0100
committerDavid S. Miller <davem@davemloft.net>2023-01-30 07:36:22 +0000
commita5300724ce7368ad324000c2aa205f60c1e58631 (patch)
tree49f5581bf1e066cea8536904e763c41ec1688248
parent4114ef2ce27383e3c14f68f56f3ec731ab6421a2 (diff)
net: microchip: sparx5: Improve error message when parsing CVLAN filter
This improves the error message when a TC filter with CVLAN tag is used and the selected VCAP instance does not support this. Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
index 8982c434cf54..f9922b35ee33 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
@@ -325,8 +325,11 @@ sparx5_tc_flower_handler_cvlan_usage(struct sparx5_tc_flower_parse_usage *st)
u16 tpid;
int err;
- if (st->admin->vtype != VCAP_TYPE_IS0)
+ if (st->admin->vtype != VCAP_TYPE_IS0) {
+ NL_SET_ERR_MSG_MOD(st->fco->common.extack,
+ "cvlan not supported in this VCAP");
return -EINVAL;
+ }
flow_rule_match_cvlan(st->frule, &mt);