On 03/10/2018 08:30 AM, Andrew Lunn wrote:
+ ret = switchdev_port_attr_get(dev, &attr);
+ if (ret)
+ return BR_LEARNING | BR_FLOOD | BR_MCAST_FLOOD | BR_BCAST_FLOOD;
Please check if ret == -EOPNOTSUPP and only then use the defaults. A
real error should be propagated, causing new_nbp to fail. You might
also consider what to do when ENODATA is returned.
ok, will change it so an error is propagated.
There is one more comment from Stephen suggesting that flags must be set
in switchdev, rather then queried: this approach should take care about
ENODATA I assume.