linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steen Hegelund <steen.hegelund@microchip.com>
To: Casper Andersson <casper.casan@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>,
	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>
Subject: Re: [PATCH net-next v2 4/9] net: microchip: sparx5: Adding initial tc flower support for VCAP API
Date: Thu, 20 Oct 2022 11:08:50 +0200	[thread overview]
Message-ID: <194f5d4aba163e9afeaa427d968bbcd3a0e4cbc5.camel@microchip.com> (raw)
In-Reply-To: <20221020073134.ru2p5m5ittadthzr@wse-c0155>

Hi Casper,

On Thu, 2022-10-20 at 09:31 +0200, Casper Andersson wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Hi Steen,
> 
> It's a pretty big patch series, but overall I think it looks very good.
> I've got some minor comments. I also tested it on the Microchip PCB135
> switch and it works as described.

Really good that you could find time to do this!

> 
> On 2022-10-19 13:42, Steen Hegelund wrote:
> > +static void sparx5_tc_flower_set_exterr(struct net_device *ndev,
> > +                                     struct flow_cls_offload *fco,
> > +                                     struct vcap_rule *vrule)
> > +{
> > +     switch (vrule->exterr) {
> > +     case VCAP_ERR_NONE:
> > +             break;
> > +     case VCAP_ERR_NO_ADMIN:
> > +             NL_SET_ERR_MSG_MOD(fco->common.extack,
> > +                                "Missing VCAP instance");
> > +             break;
> > +     case VCAP_ERR_NO_NETDEV:
> > +             NL_SET_ERR_MSG_MOD(fco->common.extack,
> > +                                "Missing network interface");
> > +             break;
> > +     case VCAP_ERR_NO_KEYSET_MATCH:
> > +             NL_SET_ERR_MSG_MOD(fco->common.extack,
> > +                                "No keyset matched the filter keys");
> > +             break;
> > +     case VCAP_ERR_NO_ACTIONSET_MATCH:
> > +             NL_SET_ERR_MSG_MOD(fco->common.extack,
> > +                                "No actionset matched the filter actions");
> > +             break;
> > +     case VCAP_ERR_NO_PORT_KEYSET_MATCH:
> > +             NL_SET_ERR_MSG_MOD(fco->common.extack,
> > +                                "No port keyset matched the filter keys");
> > +             break;
> > +     }
> > +}
> 
> Could this also be shared in the VCAP API? It currently doesn't use
> anything Sparx5 specific. Though, net_device is unused so I'm guessing
> you might have plans for this in the future. And it might fit better
> here according to your design goals.

Yes this is not Sparx5 specific so it could be added to the API (where the enums are defined
anyway).

> 
> Tested-by: Casper Andersson <casper.casan@gmail.com>
> Reviewed-by: Casper Andersson <casper.casan@gmail.com>
> 

Thanks for the review.

BR
Steen

  reply	other threads:[~2022-10-20  9:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 11:42 [PATCH net-next v2 0/9] Add support for Sparx5 IS2 VCAP Steen Hegelund
2022-10-19 11:42 ` [PATCH net-next v2 1/9] net: microchip: sparx5: Adding initial VCAP API support Steen Hegelund
2022-10-19 11:42 ` [PATCH net-next v2 2/9] net: microchip: sparx5: Adding IS2 VCAP model to VCAP API Steen Hegelund
2022-10-19 11:42 ` [PATCH net-next v2 3/9] net: microchip: sparx5: Adding IS2 VCAP register interface Steen Hegelund
2022-10-19 11:42 ` [PATCH net-next v2 4/9] net: microchip: sparx5: Adding initial tc flower support for VCAP API Steen Hegelund
2022-10-20  7:31   ` Casper Andersson
2022-10-20  9:08     ` Steen Hegelund [this message]
2022-10-19 11:42 ` [PATCH net-next v2 5/9] net: microchip: sparx5: Adding port keyset config and callback interface Steen Hegelund
2022-10-20  7:33   ` Casper Andersson
2022-10-20  9:10     ` Steen Hegelund
2022-10-19 11:42 ` [PATCH net-next v2 6/9] net: microchip: sparx5: Adding basic rule management in VCAP API Steen Hegelund
2022-10-20  7:41   ` Casper Andersson
2022-10-20  9:18     ` Steen Hegelund
2022-10-19 11:42 ` [PATCH net-next v2 7/9] net: microchip: sparx5: Writing rules to the IS2 VCAP Steen Hegelund
2022-10-20  7:48   ` Casper Andersson
2022-10-20  9:24     ` Steen Hegelund
2022-10-19 11:42 ` [PATCH net-next v2 8/9] net: microchip: sparx5: Adding KUNIT test VCAP model Steen Hegelund
2022-10-19 11:42 ` [PATCH net-next v2 9/9] net: microchip: sparx5: Adding KUNIT test for the VCAP API 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=194f5d4aba163e9afeaa427d968bbcd3a0e4cbc5.camel@microchip.com \
    --to=steen.hegelund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=casper.casan@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).