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]
Date:   Thu, 25 Aug 2022 13:55:17 +0300
From:   andrei.tachici@...d.acs.upb.ro
To:     kuba@...nel.org
Cc:     andrei.tachici@...d.acs.upb.ro, andrew@...n.ch,
        davem@...emloft.net, devicetree@...r.kernel.org,
        edumazet@...gle.com, hkallweit1@...il.com, joel@....id.au,
        krzysztof.kozlowski+dt@...aro.org, l.stelmach@...sung.com,
        linux-kernel@...r.kernel.org, linux@...linux.org.uk,
        netdev@...r.kernel.org, pabeni@...hat.com, robh+dt@...nel.org,
        vegard.nossum@...cle.com, vladimir.oltean@....com
Subject: Re: [net-next v5 2/3] net: ethernet: adi: Add ADIN1110 support

> > +static int adin1110_net_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags,
> > +				       struct netlink_ext_ack *extack)
> > +{
> > +	struct adin1110_port_priv *port_priv = netdev_priv(dev);
> > +	struct nlattr *br_spec;
> > +	struct nlattr *attr;
> > +	int rem;
> > +
> > +	br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
> > +	if (!br_spec)
> > +		return -EINVAL;
> > +
> > +	nla_for_each_nested(attr, br_spec, rem) {
> > +		u16 mode;
> > +
> > +		if (nla_type(attr) != IFLA_BRIDGE_MODE)
> > +			continue;
> > +
> > +		if (nla_len(attr) < sizeof(mode))
> > +			return -EINVAL;
> > +
> > +		port_priv->priv->br_mode = nla_get_u16(attr);
> > +		adin1110_set_rx_mode(dev);
> > +		break;
> > +	}
> > +
> > +	return 0;
> > +}
> 
> I thought this is a callback for legacy SR-IOV NICs. What are you using
> it for in a HW device over SPI? :S

Here I wanted to allow the user to change between VEPA/VEB. The ADIN2111 switch
is not VLAN aware and also can't do any meaningful forwarding when multiple
ports from multiple ADIN2111 switches are added to the same software bridge. For these
cases I thought the user would like to disable hardware forwarding (VEB).

Should detect the above cases and automatically disable any forwarding instead?

Hardware forwarding translates to: I don't know this MAC address (not my MAC address)
throw it back to the other port. ADIN2111 can't learn the FDB, although has 16 entries that
can be statically programmed.

Thanks,
Alexandru

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ