On 13/10/17 19:00, Roman Mashak wrote: > Nikolay Aleksandrov <niko...@cumulusnetworks.com> writes: > > > [...] > >>>> Why do you want to return the error code here? Walking the code paths >>>> seems like ENOENT or err from switchdev_port_obj_del are the 2 error >>>> possibilities. >>> >>> For example, if you attempt to delete a non-existing vlan on a port, >>> the current code succeeds and also sends event : >>> >>> rtnetlink_rcv_msg >>> rtnl_bridge_dellink >>> br_dellink >>> br_afspec >>> br_vlan_info >>> >>> int br_dellink(..) >>> { >>> ... >>> err = br_afspec() >>> if (err == 0) >>> br_ifinfo_notify(RTM_NEWLINK, p); >>> } >>> >>> This is misleading, so a proper errcode has to be produced. >>> >> >> True, but you also change the expected behaviour because now a user can >> clear all vlans with one request (1 - 4094), and after the change that >> will fail with a partial delete if some vlan was missing. > > Nikolay, would you like to have a crack at fixing this? >
Sure, need to finish something and will cook up a patch next week. Thanks, Nik