From: Dan Carpenter <error27@gmail.com>
To: Steen Hegelund <steen.hegelund@microchip.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
UNGLinuxDriver@microchip.com,
Randy Dunlap <rdunlap@infradead.org>,
Casper Andersson <casper.casan@gmail.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
Wan Jiabing <wanjiabing@vivo.com>,
Nathan Huckleberry <nhuck@google.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Daniel Machon <daniel.machon@microchip.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Lars Povlsen <lars.povlsen@microchip.com>,
Michael Walle <michael@walle.cc>
Subject: Re: [PATCH net-next 10/10] net: microchip: sparx5: Add TC vlan action support for the ES0 VCAP
Date: Mon, 13 Feb 2023 14:03:58 +0300 [thread overview]
Message-ID: <Y+oZHpMpW6ODQQpY@kadam> (raw)
In-Reply-To: <20230213092426.1331379-11-steen.hegelund@microchip.com>
On Mon, Feb 13, 2023 at 10:24:26AM +0100, Steen Hegelund wrote:
> +static int sparx5_tc_action_vlan_modify(struct vcap_admin *admin,
> + struct vcap_rule *vrule,
> + struct flow_cls_offload *fco,
> + struct flow_action_entry *act,
> + u16 tpid)
> +{
> + int err = 0;
> +
> + switch (admin->vtype) {
> + case VCAP_TYPE_ES0:
> + err = vcap_rule_add_action_u32(vrule,
> + VCAP_AF_PUSH_OUTER_TAG,
> + SPX5_OTAG_TAG_A);
This err assignment is never used.
> + break;
> + default:
> + NL_SET_ERR_MSG_MOD(fco->common.extack,
> + "VLAN modify action not supported in this VCAP");
> + return -EOPNOTSUPP;
> + }
> +
> + switch (tpid) {
> + case ETH_P_8021Q:
> + err = vcap_rule_add_action_u32(vrule,
> + VCAP_AF_TAG_A_TPID_SEL,
> + SPX5_TPID_A_8100);
> + break;
> + case ETH_P_8021AD:
> + err = vcap_rule_add_action_u32(vrule,
> + VCAP_AF_TAG_A_TPID_SEL,
> + SPX5_TPID_A_88A8);
> + break;
> + default:
> + NL_SET_ERR_MSG_MOD(fco->common.extack,
> + "Invalid vlan proto");
> + err = -EINVAL;
> + }
> + if (err)
> + return err;
> +
> + err = vcap_rule_add_action_u32(vrule,
> + VCAP_AF_TAG_A_VID_SEL,
> + SPX5_VID_A_VAL);
> + if (err)
> + return err;
regards,
dan carpenter
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-02-13 11:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 9:24 [PATCH net-next 00/10] Adding Sparx5 ES0 VCAP support Steen Hegelund
2023-02-13 9:24 ` [PATCH net-next 01/10] net: microchip: sparx5: Discard frames with SMAC multicast addresses Steen Hegelund
2023-02-13 9:24 ` [PATCH net-next 02/10] net: microchip: sparx5: Clear rule counter even if lookup is disabled Steen Hegelund
2023-02-13 11:29 ` Dan Carpenter
2023-02-13 12:44 ` Steen Hegelund
2023-02-13 15:06 ` Dan Carpenter
2023-02-13 15:32 ` Steen Hegelund
2023-02-13 15:38 ` Dan Carpenter
2023-02-13 9:24 ` [PATCH net-next 03/10] net: microchip: sparx5: Egress VLAN TPID configuration follows IFH Steen Hegelund
2023-02-13 9:24 ` [PATCH net-next 04/10] net: microchip: sparx5: Use chain ids without offsets when enabling rules Steen Hegelund
2023-02-13 11:05 ` Dan Carpenter
2023-02-13 12:48 ` Steen Hegelund
2023-02-13 15:07 ` Dan Carpenter
2023-02-13 15:13 ` Dan Carpenter
2023-02-13 15:46 ` Steen Hegelund
2023-02-13 9:24 ` [PATCH net-next 05/10] net: microchip: sparx5: Improve the error handling for linked rules Steen Hegelund
2023-02-13 9:24 ` [PATCH net-next 06/10] net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP model Steen Hegelund
2023-02-13 9:24 ` [PATCH net-next 08/10] net: microchip: sparx5: Add ES0 VCAP keyset configuration for Sparx5 Steen Hegelund
2023-02-13 9:24 ` [PATCH net-next 09/10] net: microchip: sparx5: Add TC support for the ES0 VCAP Steen Hegelund
2023-02-13 9:24 ` [PATCH net-next 10/10] net: microchip: sparx5: Add TC vlan action " Steen Hegelund
2023-02-13 11:03 ` Dan Carpenter [this message]
2023-02-13 12:50 ` Steen Hegelund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y+oZHpMpW6ODQQpY@kadam \
--to=error27@gmail.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=casper.casan@gmail.com \
--cc=daniel.machon@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=lars.povlsen@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=netdev@vger.kernel.org \
--cc=nhuck@google.com \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=steen.hegelund@microchip.com \
--cc=wanjiabing@vivo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox