[no subject]

2017-04-25 Thread prasad padiyar
subscribe linux-netdev


Regarding patch: vlan: avoid a synchronize_net when parent device goes down

2017-04-23 Thread prasad padiyar
Hi,

I had a query regarding the patch in the subject line.


>From the patch pasted below

 vlan = vlan_dev_priv(vlandev);
 if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING))
-dev_change_flags(vlandev, flgs & ~IFF_UP);
+list_add(>close_list, _list);
+}
+
+dev_close_many(_list, false);
+
+list_for_each_entry_safe(vlandev, tmp, _list, close_list) {
 netif_stacked_transfer_operstate(dev, vlandev);
+list_del_init(>close_list);
 }
+list_del(_list);

"

 if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING))
-dev_change_flags(vlandev, flgs & ~IFF_UP);
+list_add(>close_list, _list);
+}
+
+dev_close_many(_list, false);
+
+list_for_each_entry_safe(vlandev, tmp, _list, close_list) {
 netif_stacked_transfer_operstate(dev, vlandev);
+list_del_init(>close_list);
 }
+list_del(_list);.


i can see that dev_change_flags which was setting the vlan device to
down state in case VLAN_FLAG_LOOSE_BINDING was not enabled.
But setting the operstate when the VLAN real device goes admin down
was quite independent of VLAN_FLAG_LOOSE_BINDING.

Operstate was always getting transferred irrespective of LOOSE_BINDING flag.


But now with this patch, we see that control of transferring the
operstate is based of VLAN_FLAG_LOOSE_BINDING. If
VLAN_FLAG_LOOSE_BINDING is set then oper state is not changed as per
its real iface.


Is this the expected behavior. Does VLAN_FLAG_LOOSE_BINDING with this
patch has to control the operstate as well which was not
the case earlier without this patch. ?

Can someone share your views about this.

Kernel version: 4.4.20

patch link:
https://patchwork.ozlabs.org/patch/447837/

-- 
Regards,
Prasad