Re: [Bridge] [PATCH net-next 1/5] bridge: initialize port flags with switchdev defaults

2018-03-12 Thread Igor Mitsyanko
On 03/10/2018 08:32 AM, Stephen Hemminger wrote: Yes hardware devices may come it with different default values. But the user experience on Linux needs to be consistent. Instead, it makes more sense to me for each device driver using switchdev to program to the values that it sees in the

Re: [Bridge] [PATCH net-next 1/5] bridge: initialize port flags with switchdev defaults

2018-03-12 Thread Igor Mitsyanko
On 03/10/2018 08:30 AM, Andrew Lunn wrote: + + ret = switchdev_port_attr_get(dev, ); + if (ret) + return BR_LEARNING | BR_FLOOD | BR_MCAST_FLOOD | BR_BCAST_FLOOD; Hi Igor Please check if ret == -EOPNOTSUPP and only then use the defaults. A real error should be propagated,

Re: [Bridge] [PATCH net-next 1/5] bridge: initialize port flags with switchdev defaults

2018-03-10 Thread Andrew Lunn
On Fri, Mar 09, 2018 at 07:03:04PM -0800, Igor Mitsyanko wrote: > Default bridge port flags for switchdev devices can be different from > what is used in bridging core. Get default value from switchdev itself > on port initialization. > > Signed-off-by: Igor Mitsyanko

Re: [Bridge] [PATCH net-next 1/5] bridge: initialize port flags with switchdev defaults

2018-03-10 Thread Stephen Hemminger
On Fri, 9 Mar 2018 19:03:04 -0800 Igor Mitsyanko wrote: > Default bridge port flags for switchdev devices can be different from > what is used in bridging core. Get default value from switchdev itself > on port initialization. > > Signed-off-by: Igor Mitsyanko