On Sunday, May 08, 2016 23:41:59 Antonio Quartulli wrote:
On Sun, May 08, 2016 at 07:47:16AM +0800, Marek Lindner wrote:
The ELP interval and throughput override interface settings are initialized with default settings on every iface_enable() call. Thus, the user space configuration is overridden as soon as an interface is going down and coming up again.
iface_enable() is only invoked when an interface is added to the mesh. Up and Down should trigger a iface_activate/deactivate() only.
Have you seen the userspace settings being reverted ?
Without my patch: root@OpenWrt:/# cat /sys/class/net/eth1/batman_adv/elp_interval 500 root@OpenWrt:/# echo 700 > /sys/class/net/eth1/batman_adv/elp_interval [51835.004638] batman_adv: eth1: elp_interval: Changing from: 500 to: 700 root@OpenWrt:/# ifconfig eth1 down && ifconfig eth1 up root@OpenWrt:/# cat /sys/class/net/eth1/batman_adv/elp_interval 500
With my patch: root@OpenWrt:/# cat /sys/class/net/eth1/batman_adv/elp_interval 500 root@OpenWrt:/# echo 700 > /sys/class/net/eth1/batman_adv/elp_interval [ 33.972946] batman_adv: eth1: elp_interval: Changing from: 500 to: 700 root@OpenWrt:/# ifconfig eth1 down && ifconfig eth1 up root@OpenWrt:/# cat /sys/class/net/eth1/batman_adv/elp_interval 700
Cheers, Marek