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: <VE1PR04MB6496BF61F5C899351174E82A92D70@VE1PR04MB6496.eurprd04.prod.outlook.com>
Date:   Sun, 19 Apr 2020 01:44:23 +0000
From:   Po Liu <po.liu@....com>
To:     Vladimir Oltean <olteanv@...il.com>
CC:     "David S. Miller" <davem@...emloft.net>,
        lkml <linux-kernel@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        Vinicius Costa Gomes <vinicius.gomes@...el.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Alexandru Marginean <alexandru.marginean@....com>,
        "michael.chan@...adcom.com" <michael.chan@...adcom.com>,
        "vishal@...lsio.com" <vishal@...lsio.com>,
        "saeedm@...lanox.com" <saeedm@...lanox.com>,
        "leon@...nel.org" <leon@...nel.org>,
        Jiri Pirko <jiri@...lanox.com>,
        Ido Schimmel <idosch@...lanox.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        "simon.horman@...ronome.com" <simon.horman@...ronome.com>,
        "pablo@...filter.org" <pablo@...filter.org>,
        "moshe@...lanox.com" <moshe@...lanox.com>,
        Murali Karicheri <m-karicheri2@...com>,
        Andre Guedes <andre.guedes@...ux.intel.com>,
        Stephen Hemminger <stephen@...workplumber.org>
Subject: RE: [EXT] Re: [ v2,net-next 4/4] net: enetc: add tc flower psfp
 offload driver

Hi Vladimir,

> -----Original Message-----
> From: Vladimir Oltean <olteanv@...il.com>
> Sent: 2020年4月19日 6:53
> To: Po Liu <po.liu@....com>
> Cc: David S. Miller <davem@...emloft.net>; lkml <linux-
> kernel@...r.kernel.org>; netdev <netdev@...r.kernel.org>; Vinicius Costa
> Gomes <vinicius.gomes@...el.com>; Claudiu Manoil
> <claudiu.manoil@....com>; Vladimir Oltean <vladimir.oltean@....com>;
> Alexandru Marginean <alexandru.marginean@....com>;
> michael.chan@...adcom.com; vishal@...lsio.com;
> saeedm@...lanox.com; leon@...nel.org; Jiri Pirko <jiri@...lanox.com>;
> Ido Schimmel <idosch@...lanox.com>; Alexandre Belloni
> <alexandre.belloni@...tlin.com>; Microchip Linux Driver Support
> <UNGLinuxDriver@...rochip.com>; Jakub Kicinski <kuba@...nel.org>;
> Jamal Hadi Salim <jhs@...atatu.com>; Cong Wang
> <xiyou.wangcong@...il.com>; simon.horman@...ronome.com;
> pablo@...filter.org; moshe@...lanox.com; Murali Karicheri <m-
> karicheri2@...com>; Andre Guedes <andre.guedes@...ux.intel.com>;
> Stephen Hemminger <stephen@...workplumber.org>
> Subject: [EXT] Re: [ v2,net-next 4/4] net: enetc: add tc flower psfp offload
> driver
> 
> Caution: EXT Email
> 
> Hi Po,
> 
> On Sat, 18 Apr 2020 at 04:35, Po Liu <Po.Liu@....com> wrote:
> >
> > +       if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ETH_ADDRS))
> {
> > +               struct flow_match_eth_addrs match;
> > +
> > +               flow_rule_match_eth_addrs(rule, &match);
> > +
> > +               if (!is_zero_ether_addr(match.mask->dst)) {
> 
> Does ENETC support masked matching on MAC address? If not, you should
> error out if the mask is not ff:ff:ff:ff:ff:ff.

I get it. Thanks.

> 
> > +                       ether_addr_copy(filter->sid.dst_mac, match.key->dst);
> > +                       filter->sid.filtertype = STREAMID_TYPE_NULL;
> > +               }
> > +
> > +               if (!is_zero_ether_addr(match.mask->src)) {
> > +                       ether_addr_copy(filter->sid.src_mac, match.key->src);
> > +                       filter->sid.filtertype = STREAMID_TYPE_SMAC;
> > +               }
> > +       } else {
> > +               NL_SET_ERR_MSG_MOD(extack, "Unsupported, must
> ETH_ADDRS");
> > +               return -EINVAL;
> > +       }
> > +
> > +       if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_VLAN)) {
> > +               struct flow_match_vlan match;
> > +
> > +               flow_rule_match_vlan(rule, &match);
> > +               if (match.mask->vlan_priority) {
> > +                       if (match.mask->vlan_priority !=
> > +                           (VLAN_PRIO_MASK >> VLAN_PRIO_SHIFT)) {
> > +                               NL_SET_ERR_MSG_MOD(extack, "Only full mask is
> supported for VLAN priority");
> > +                               err = -EINVAL;
> > +                               goto free_filter;
> > +                       }
> > +               }
> > +
> > +               if (match.mask->vlan_tpid) {
> > +                       if (match.mask->vlan_tpid != VLAN_VID_MASK) {
> 
> I'm pretty sure that vlan_tpid is the EtherType (0x8100, etc), and
> that you actually meant vlan_id.
> 

Yes, I'll correct it.

> > --
> > 2.17.1
> >
> 
> Thanks,
> -Vladimir

Br,
Po Liu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ