On Mon, Aug 02, 2021 at 03:10:33PM +0200, Oleksij Rempel wrote: > Make sure that all external port are actually isolated from each other, > so no packets are leaked. > > Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> > --- > drivers/net/dsa/qca/ar9331.c | 109 ++++++++++++++++++++++++++++++++++- > 1 file changed, 108 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c > index 6686192e1883..2f5673ea3140 100644 > --- a/drivers/net/dsa/qca/ar9331.c > +++ b/drivers/net/dsa/qca/ar9331.c > @@ -60,10 +60,20 @@ > > #define AR9331_SW_REG_FLOOD_MASK 0x2c > #define AR9331_SW_FLOOD_MASK_BROAD_TO_CPU BIT(26) > +#define AR9331_SW_FLOOD_MASK_MULTI_FLOOD_DP GENMASK(20, 16) > +#define AR9331_SW_FLOOD_MASK_UNI_FLOOD_DP GENMASK(4, 0) > > #define AR9331_SW_REG_GLOBAL_CTRL 0x30 > #define AR9331_SW_GLOBAL_CTRL_MFS_M GENMASK(13, 0) > > +#define AR9331_SW_REG_ADDR_TABLE_CTRL 0x5c > +#define AR9331_SW_AT_ARP_EN BIT(20) > +#define AR9331_SW_AT_LEARN_CHANGE_EN BIT(18) > +#define AR9331_SW_AT_AGE_EN BIT(17) > +#define AR9331_SW_AT_AGE_TIME GENMASK(15, 0) > +/* AGE_TIME_COEF is not documented. This is "works for me" value */ > +#define AR9331_SW_AT_AGE_TIME_COEF 6900 Not documented, not used either, it seems. "Works for you" based on what? > + > #define AR9331_SW_REG_MDIO_CTRL 0x98 > #define AR9331_SW_MDIO_CTRL_BUSY BIT(31) > #define AR9331_SW_MDIO_CTRL_MASTER_EN BIT(30) > @@ -101,6 +111,46 @@ > AR9331_SW_PORT_STATUS_RX_FLOW_EN | AR9331_SW_PORT_STATUS_TX_FLOW_EN | \ > AR9331_SW_PORT_STATUS_SPEED_M) Is this patch material for "net"? If standalone ports is all that ar9331 supports, then it would better not do packet forwarding in lack of a bridge device.