[PATCH net-next v2 4/9] net: microchip: sparx5: Adding initial tc flower support for VCAP API

Steen Hegelund steen.hegelund at microchip.com
Thu Oct 20 02:08:50 PDT 2022


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 at gmail.com>
> Reviewed-by: Casper Andersson <casper.casan at gmail.com>
> 

Thanks for the review.

BR
Steen


More information about the linux-arm-kernel mailing list