Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-03 Thread Florian Fainelli
On 2/23/2021 10:12 PM, DENG Qingfang wrote: > Use port isolation registers to configure bridge offloading. > Remove the VLAN init, as we have proper CPU tag and bridge offloading > support now. > > Signed-off-by: DENG Qingfang > --- > This is not tested, as I don't have a RTL8366RB board. And

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-02 Thread Vladimir Oltean
On Tue, Mar 02, 2021 at 05:05:00PM +0100, Linus Walleij wrote: > On Tue, Mar 2, 2021 at 4:58 AM DENG Qingfang wrote: > > On Mon, Mar 1, 2021 at 9:48 PM Linus Walleij > > wrote: > > > With my minor changes: > > > Tested-by: Linus Walleij > > > > How about using a mutex lock in port_bridge_{join,

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-02 Thread Linus Walleij
On Tue, Mar 2, 2021 at 5:11 PM Vladimir Oltean wrote: > On Tue, Mar 02, 2021 at 05:05:00PM +0100, Linus Walleij wrote: > > On Tue, Mar 2, 2021 at 4:58 AM DENG Qingfang wrote: > > > On Mon, Mar 1, 2021 at 9:48 PM Linus Walleij > > > wrote: > > > > With my minor changes: > > > > Tested-by: Linus

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-02 Thread Linus Walleij
On Tue, Mar 2, 2021 at 4:58 AM DENG Qingfang wrote: > On Mon, Mar 1, 2021 at 9:48 PM Linus Walleij wrote: > > With my minor changes: > > Tested-by: Linus Walleij > > How about using a mutex lock in port_bridge_{join,leave} ? > In my opinion all functions that access multiple registers should be

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-02 Thread DENG Qingfang
On Mon, Mar 1, 2021 at 9:48 PM Linus Walleij wrote: > With my minor changes: > Tested-by: Linus Walleij How about using a mutex lock in port_bridge_{join,leave} ? In my opinion all functions that access multiple registers should be synchronized. > Yours, > Linus Walleij

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-02 Thread DENG Qingfang
On Mon, Mar 1, 2021 at 9:55 PM Linus Walleij wrote: > > BTW where did you find this register? It's not in any of my > vendor driver code dumps. DD-WRT https://svn.dd-wrt.com/browser/src/linux/universal/linux-4.14/drivers/net/ethernet/ag7100/RTL8366RB_DRIVER/rtl8368s_reg.h#L581 > > Curious! > > Y

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-01 Thread Linus Walleij
On Wed, Feb 24, 2021 at 7:12 AM DENG Qingfang wrote: > +/* Port isolation registers */ > +#define RTL8366RB_PORT_ISO_BASE0x0F08 > +#define RTL8366RB_PORT_ISO(pnum) (RTL8366RB_PORT_ISO_BASE + (pnum)) > +#define RTL8366RB_PORT_ISO_EN BIT(0) > +#define RTL8366RB_PORT_I

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-01 Thread Linus Walleij
On Wed, Feb 24, 2021 at 7:12 AM DENG Qingfang wrote: > Use port isolation registers to configure bridge offloading. > Remove the VLAN init, as we have proper CPU tag and bridge offloading > support now. > > Signed-off-by: DENG Qingfang > --- > This is not tested, as I don't have a RTL8366RB boar

[RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-02-23 Thread DENG Qingfang
Use port isolation registers to configure bridge offloading. Remove the VLAN init, as we have proper CPU tag and bridge offloading support now. Signed-off-by: DENG Qingfang --- This is not tested, as I don't have a RTL8366RB board. And I think there is potential race condition in port_bridge_{joi