[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YN8tWtqfRRO7kAlb@lunn.ch>
Date: Fri, 2 Jul 2021 17:14:34 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Oleksij Rempel <o.rempel@...gutronix.de>, '@...n.ch
Cc: Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Russell King <linux@...linux.org.uk>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org
Subject: Re: [PATCH net-next v2 3/6] net: dsa: qca: ar9331: add forwarding
database support'
On Fri, Jul 02, 2021 at 12:17:48PM +0200, Oleksij Rempel wrote:
> This switch provides simple address resolution table, without VLAN or
> multicast specific information.
> With this patch we are able now to read, modify unicast and mulicast
mul_t_icast.
> addresses.
> +static int ar9331_sw_port_fdb_dump(struct dsa_switch *ds, int port,
> + dsa_fdb_dump_cb_t *cb, void *data)
> +{
> + struct ar9331_sw_priv *priv = (struct ar9331_sw_priv *)ds->priv;
> + int cnt = AR9331_SW_NUM_ARL_RECORDS;
> + struct ar9331_sw_fdb _fdb = { 0 };
Why use _fdb? There does not appear to be an fdb?
> +static int ar9331_sw_port_fdb_rmw(struct ar9331_sw_priv *priv,
> + const unsigned char *mac,
> + u8 port_mask_set,
> + u8 port_mask_clr)
> +{
> + struct regmap *regmap = priv->regmap;
> + u32 f0, f1, f2 = 0;
> + u8 port_mask, port_mask_new, status, func;
> + int ret;
Reverse Christmas tree.
> +static int ar9331_sw_port_fdb_add(struct dsa_switch *ds, int port,
> + const unsigned char *mac, u16 vid)
> +{
> + struct ar9331_sw_priv *priv = (struct ar9331_sw_priv *)ds->priv;
> + u16 port_mask = BIT(port);
> +
> + dev_info(priv->dev, "%s(%pM, %x)\n", __func__, mac, port);
dev_dbg()?
Andrew
Powered by blists - more mailing lists