]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: microchip: sparx5: Improve error message when parsing CVLAN filter
authorSteen Hegelund <steen.hegelund@microchip.com>
Fri, 27 Jan 2023 13:08:25 +0000 (14:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Jan 2023 07:36:22 +0000 (07:36 +0000)
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>
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c

index 8982c434cf54409cccaf4a188ba1b4cc0a669a29..f9922b35ee3349daaf80e679787b38f4f490609e 100644 (file)
@@ -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);