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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 2 Aug 2021 16:18:36 +0530 From: Prasanna Vengateshan <prasanna.vengateshan@...rochip.com> To: Vladimir Oltean <olteanv@...il.com> CC: <andrew@...n.ch>, <netdev@...r.kernel.org>, <robh+dt@...nel.org>, <UNGLinuxDriver@...rochip.com>, <Woojung.Huh@...rochip.com>, <hkallweit1@...il.com>, <linux@...linux.org.uk>, <davem@...emloft.net>, <kuba@...nel.org>, <linux-kernel@...r.kernel.org>, <vivien.didelot@...il.com>, <f.fainelli@...il.com>, <devicetree@...r.kernel.org> Subject: Re: [PATCH v3 net-next 10/10] net: dsa: microchip: add support for vlan operations On Sat, 2021-07-31 at 18:08 +0300, Vladimir Oltean wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Fri, Jul 23, 2021 at 11:01:08PM +0530, Prasanna Vengateshan wrote: > > +static int lan937x_port_vlan_add(struct dsa_switch *ds, int port, > > + const struct switchdev_obj_port_vlan *vlan, > > + struct netlink_ext_ack *extack) > > +{ > > + bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED; > > + struct ksz_device *dev = ds->priv; > > + struct lan937x_vlan vlan_entry; > > + int ret; > > + > > + ret = lan937x_get_vlan_table(dev, vlan->vid, &vlan_entry); > > + if (ret < 0) { > > + NL_SET_ERR_MSG_MOD(extack, "Failed to get vlan table\n"); > > The NL_SET_ERR_MSG_MOD function already adds the \n at the end. i will remove \n from other places as well for NL_SET_ERR_MSG_MOD. > > > + return ret; > > > > + > > + /* change PVID */ > > + if (vlan->flags & BRIDGE_VLAN_INFO_PVID) { > > + ret = lan937x_pwrite16(dev, port, REG_PORT_DEFAULT_VID, > > + vlan->vid); > > + if (ret < 0) { > > + NL_SET_ERR_MSG_MOD(extack, "Failed to set pvid\n"); > > + return ret; > > + } > > + } > > + > > + return 0; > > +} > > Side question: do you think the ds->configure_vlan_while_not_filtering = false > from ksz9477.c and ksz8795.c serve any purpose, considering that you did > not need this setting for lan937x? If not, could you please send a patch > to remove that setting from those 2 other KSZ drivers? Thanks. Sure, I will add this patch in my next submission.
Powered by blists - more mailing lists