From: Steen Hegelund <steen.hegelund@microchip.com>
To: Dan Carpenter <error27@gmail.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 3/8] net: microchip: sparx5: Add actionset type id information to rule
Date: Fri, 20 Jan 2023 10:35:20 +0100 [thread overview]
Message-ID: <1a66c3d22f0d6fccb7847a6ae6df011a43af0a9c.camel@microchip.com> (raw)
In-Reply-To: <Y8pawZOGjsfStC6n@kadam>
Hi Dan,
Thanks for the review.
On Fri, 2023-01-20 at 12:11 +0300, Dan Carpenter wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> On Fri, Jan 20, 2023 at 10:08:26AM +0100, Steen Hegelund wrote:
> > +/* Add the actionset typefield to the list of rule actionfields */
> > +static int vcap_add_type_actionfield(struct vcap_rule *rule)
> > +{
> > + enum vcap_actionfield_set actionset = rule->actionset;
> > + struct vcap_rule_internal *ri = to_intrule(rule);
> > + enum vcap_type vt = ri->admin->vtype;
> > + const struct vcap_field *fields;
> > + const struct vcap_set *aset;
> > + int ret = -EINVAL;
> > +
> > + aset = vcap_actionfieldset(ri->vctrl, vt, actionset);
> > + if (!aset)
> > + return ret;
> > + if (aset->type_id == (u8)-1) /* No type field is needed */
> > + return 0;
> > +
> > + fields = vcap_actionfields(ri->vctrl, vt, actionset);
> > + if (!fields)
> > + return -EINVAL;
> > + if (fields[VCAP_AF_TYPE].width > 1) {
> > + ret = vcap_rule_add_action_u32(rule, VCAP_AF_TYPE,
> > + aset->type_id);
> > + } else {
> > + if (aset->type_id)
> > + ret = vcap_rule_add_action_bit(rule, VCAP_AF_TYPE,
> > + VCAP_BIT_1);
> > + else
> > + ret = vcap_rule_add_action_bit(rule, VCAP_AF_TYPE,
> > + VCAP_BIT_0);
> > + }
> > + return 0;
>
> return ret; ?
yes that correct... I will update that.
>
> > +}
>
> regards,
> dan carpenter
>
BR
Steen
_______________________________________________
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-01-20 9:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-20 9:08 [PATCH net-next 0/8] Adding Sparx5 IS0 VCAP support Steen Hegelund
2023-01-20 9:08 ` [PATCH net-next 2/8] net: microchip: sparx5: Add IS0 VCAP keyset configuration for Sparx5 Steen Hegelund
2023-01-20 9:08 ` [PATCH net-next 3/8] net: microchip: sparx5: Add actionset type id information to rule Steen Hegelund
2023-01-20 9:11 ` Dan Carpenter
2023-01-20 9:35 ` Steen Hegelund [this message]
2023-01-20 9:08 ` [PATCH net-next 4/8] net: microchip: sparx5: Add TC support for IS0 VCAP Steen Hegelund
2023-01-20 9:13 ` Dan Carpenter
2023-01-20 9:36 ` Steen Hegelund
2023-01-20 9:08 ` [PATCH net-next 5/8] net: microchip: sparx5: Add TC filter chaining support for IS0 and IS2 VCAPs Steen Hegelund
2023-01-20 9:08 ` [PATCH net-next 6/8] net: microchip: sparx5: Add automatic selection of VCAP rule actionset Steen Hegelund
2023-01-20 9:08 ` [PATCH net-next 7/8] net: microchip: sparx5: Add support for IS0 VCAP ethernet protocol types Steen Hegelund
2023-01-20 9:20 ` Dan Carpenter
2023-01-20 9:38 ` Steen Hegelund
2023-01-20 9:08 ` [PATCH net-next 8/8] net: microchip: sparx5: Add support for IS0 VCAP CVLAN TC keys 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=1a66c3d22f0d6fccb7847a6ae6df011a43af0a9c.camel@microchip.com \
--to=steen.hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=casper.casan@gmail.com \
--cc=daniel.machon@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=error27@gmail.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=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;
as well as URLs for NNTP newsgroup(s).