RE: [PATCH net-next 5/5] net: dsa: split dsa_port's netdev member

2017-10-13 Thread Vivien Didelot
Hi David, David Laight writes: > From: Vivien Didelot >> Sent: 13 October 2017 16:29 >> Vivien Didelot writes: >> >> >>> How about using: >> >>> >> >>> union { >> >>> struct net_device *master; >> >>> struct net_device *slave; >> >>> } netdev; >> >> ... >> >> >> >> You can

RE: [PATCH net-next 5/5] net: dsa: split dsa_port's netdev member

2017-10-13 Thread David Laight
From: Vivien Didelot > Sent: 13 October 2017 16:29 > Vivien Didelot writes: > > >>> How about using: > >>> > >>> union { > >>> struct net_device *master; > >>> struct net_device *slave; > >>> } netdev; > >> ... > >> > >> You can remove the 'netdev' all the compilers suppor

RE: [PATCH net-next 5/5] net: dsa: split dsa_port's netdev member

2017-10-13 Thread Vivien Didelot
Hi again, Vivien Didelot writes: >>> How about using: >>> >>> union { >>> struct net_device *master; >>> struct net_device *slave; >>> } netdev; >> ... >> >> You can remove the 'netdev' all the compilers support unnamed unions. > > There are issues with older GCC

RE: [PATCH net-next 5/5] net: dsa: split dsa_port's netdev member

2017-10-13 Thread Vivien Didelot
Hi David, David Laight writes: > From: Florian Fainelli >> Sent: 13 October 2017 00:05 > ... >> How about using: >> >> union { >> struct net_device *master; >> struct net_device *slave; >> } netdev; > ... > > You can remove the 'netdev' all the compilers supp

RE: [PATCH net-next 5/5] net: dsa: split dsa_port's netdev member

2017-10-13 Thread David Laight
From: Florian Fainelli > Sent: 13 October 2017 00:05 ... > How about using: > > union { > struct net_device *master; > struct net_device *slave; > } netdev; ... You can remove the 'netdev' all the compilers support unnamed unions. David

Re: [PATCH net-next 5/5] net: dsa: split dsa_port's netdev member

2017-10-12 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > On 10/12/2017 03:51 PM, Vivien Didelot wrote: >> The dsa_port structure has a "netdev" member, which can be used for >> either the master device, or the slave device, depending on its type. >> >> It is true that today, CPU port are not exposed to userspace

Re: [PATCH net-next 5/5] net: dsa: split dsa_port's netdev member

2017-10-12 Thread Florian Fainelli
On 10/12/2017 03:51 PM, Vivien Didelot wrote: > The dsa_port structure has a "netdev" member, which can be used for > either the master device, or the slave device, depending on its type. > > It is true that today, CPU port are not exposed to userspace, thus the > port's netdev member can be used

[PATCH net-next 5/5] net: dsa: split dsa_port's netdev member

2017-10-12 Thread Vivien Didelot
The dsa_port structure has a "netdev" member, which can be used for either the master device, or the slave device, depending on its type. It is true that today, CPU port are not exposed to userspace, thus the port's netdev member can be used to point to its master interface. But it is still sligh