lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <382f9239620edb44cf6b4e6b295e58fe31c45c12.camel@microchip.com>
Date:   Mon, 13 Feb 2023 13:50:23 +0100
From:   Steen Hegelund <steen.hegelund@...rochip.com>
To:     Dan Carpenter <error27@...il.com>
CC:     "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        <UNGLinuxDriver@...rochip.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Casper Andersson <casper.casan@...il.com>,
        "Russell King" <rmk+kernel@...linux.org.uk>,
        Wan Jiabing <wanjiabing@...o.com>,
        "Nathan Huckleberry" <nhuck@...gle.com>,
        <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        "Daniel Machon" <daniel.machon@...rochip.com>,
        Horatiu Vultur <horatiu.vultur@...rochip.com>,
        Lars Povlsen <lars.povlsen@...rochip.com>,
        Michael Walle <michael@...le.cc>
Subject: Re: [PATCH net-next 10/10] net: microchip: sparx5: Add TC vlan
 action support for the ES0 VCAP

Hi Dan,

On Mon, 2023-02-13 at 14:03 +0300, Dan Carpenter wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> 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.

Oops!  I will update this.

> 
> > +             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
> 

Thanks for your comments, as always very helpful.

BR
Steen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ