Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-06-21 Thread Ido Schimmel
On Sat, Jun 20, 2020 at 03:56:39PM +0300, Vadym Kochan wrote: > But it will look same as prestera_destroy_ports(), do you think > this is not a problem to have a same logic doubled ? No, error paths of init() usually share logic with fini(). The benefits of being consistent, always having init()

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-06-20 Thread Vadym Kochan
Hi Ido, On Wed, Jun 03, 2020 at 12:23:58PM +0300, Ido Schimmel wrote: > On Mon, Jun 01, 2020 at 01:50:13PM +0300, Vadym Kochan wrote: > > Hi Ido, > > > > On Sat, May 30, 2020 at 06:48:01PM +0300, Ido Schimmel wrote: > > > On Thu, May 28, 2020 at 06:12:40PM +0300, Vadym Kochan wrote: > > > > >

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-06-10 Thread Vadym Kochan
On Wed, Jun 03, 2020 at 04:16:32PM +0200, Jiri Pirko wrote: > Thu, May 28, 2020 at 05:12:40PM CEST, vadym.koc...@plvision.eu wrote: > > [...] > > >+} > >+ > >+int prestera_hw_port_info_get(const struct prestera_port *port, > >+ u16 *fp_id, u32 *hw_id, u32 *dev_id) > >

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-06-03 Thread Jiri Pirko
Wed, Jun 03, 2020 at 04:29:44PM CEST, j...@resnulli.us wrote: >Thu, May 28, 2020 at 05:12:40PM CEST, vadym.koc...@plvision.eu wrote: > >[...] > >>+static int prestera_port_create(struct prestera_switch *sw, u32 id) >>+{ >>+ struct prestera_port *port; >>+ struct net_device *dev; >>+

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-06-03 Thread Jiri Pirko
Thu, May 28, 2020 at 05:12:40PM CEST, vadym.koc...@plvision.eu wrote: [...] >+static int prestera_port_create(struct prestera_switch *sw, u32 id) >+{ >+ struct prestera_port *port; >+ struct net_device *dev; >+ int err; >+ >+ dev = alloc_etherdev(sizeof(*port)); >+ if

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-06-03 Thread Jiri Pirko
Thu, May 28, 2020 at 05:12:40PM CEST, vadym.koc...@plvision.eu wrote: [...] >+} >+ >+int prestera_hw_port_info_get(const struct prestera_port *port, >+u16 *fp_id, u32 *hw_id, u32 *dev_id) Please unify the ordering of "hw_id" and "dev_id" with the rest of the

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-06-03 Thread Ido Schimmel
On Mon, Jun 01, 2020 at 01:50:13PM +0300, Vadym Kochan wrote: > Hi Ido, > > On Sat, May 30, 2020 at 06:48:01PM +0300, Ido Schimmel wrote: > > On Thu, May 28, 2020 at 06:12:40PM +0300, Vadym Kochan wrote: > > > > [...] > > > Nit: "From" ? > > > > > + PRESTERA_DSA_CMD_FROM_CPU, > > > +}; > > >

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-06-01 Thread Vadym Kochan
Hi Ido, On Sat, May 30, 2020 at 06:48:01PM +0300, Ido Schimmel wrote: > On Thu, May 28, 2020 at 06:12:40PM +0300, Vadym Kochan wrote: > [...] > Nit: "From" ? > > > + PRESTERA_DSA_CMD_FROM_CPU, > > +}; > > + > > +struct prestera_dsa_vlan { > > + u16 vid; > > + u8 vpt; > > + u8 cfi_bit;

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-30 Thread Ido Schimmel
On Thu, May 28, 2020 at 06:12:40PM +0300, Vadym Kochan wrote: > Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely > wireless SMB deployment. > > The current implementation supports only boards designed for the

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-29 Thread Andrew Lunn
On Sat, May 30, 2020 at 03:46:22AM +0300, Vadym Kochan wrote: > Hi David, > > On Fri, May 29, 2020 at 05:18:39PM -0700, David Miller wrote: > > > > Please remove all of the __packed attributes. > > > > I looked at your data structures and all of them use fixed sized types > > and are multiples

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-29 Thread Vadym Kochan
Hi David, On Fri, May 29, 2020 at 05:18:39PM -0700, David Miller wrote: > > Please remove all of the __packed attributes. > > I looked at your data structures and all of them use fixed sized types > and are multiples of 4 so the __packed attribute is completely > unnecessary. > > The alignment

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-29 Thread David Miller
Please remove all of the __packed attributes. I looked at your data structures and all of them use fixed sized types and are multiples of 4 so the __packed attribute is completely unnecessary. The alignment attribute is also unnecessary so please remove that too.

[net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-28 Thread Vadym Kochan
Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely wireless SMB deployment. The current implementation supports only boards designed for the Marvell Switchdev solution and requires special firmware. The core