[RFC PATCH 3/4] batman-adv: Don't expect inter-netns unique iflink indices

2022-02-27 Thread Sven Eckelmann
The ifindex doesn't have to be unique for multiple network namespaces on the same machine. $ ip netns add test1 $ ip -net test1 link add dummy1 type dummy $ ip netns add test2 $ ip -net test2 link add dummy2 type dummy $ ip -net test1 link show dev dummy1 6: dummy1: mtu 1500 qdisc

[RFC PATCH 4/4] batman-adv: Demote batadv-on-batadv skip error message

2022-02-27 Thread Sven Eckelmann
The error message "Cannot find parent device" was shown for users of macvtap (on batadv devices) whenever the macvtap was moved to a different netns. This happens because macvtap doesn't provide The situation for which this message is printed is actually not an error but just a warning that the

[RFC PATCH 1/4] batman-adv: Request iflink once in batadv-on-batadv check

2022-02-27 Thread Sven Eckelmann
There is no need to call dev_get_iflink multiple times for the same net_device in batadv_is_on_batman_iface. And since some of the .ndo_get_iflink callbacks are dynamic (for example via RCUs like in vxcan_get_iflink), it could easily happen that the returned values are not stable. The pre-checks

[RFC PATCH 2/4] batman-adv: Request iflink once in batadv_get_real_netdevice

2022-02-27 Thread Sven Eckelmann
There is no need to call dev_get_iflink multiple times for the same net_device in batadv_get_real_netdevice. And since some of the ndo_get_iflink callbacks are dynamic (for example via RCUs like in vxcan_get_iflink), it could easily happen that the returned values are not stable. The pre-checks

Re: [RFC PATCH 4/4] batman-adv: Demote batadv-on-batadv skip error message

2022-02-27 Thread Sven Eckelmann
On Monday, 28 February 2022 01:24:30 CET Leonardo Mörlein wrote: > > This happens because macvtap doesn't provide > > > > I think there are some missing words. Correct. "This happens because macvtap doesn't provide an implementation for rtnl_link_ops->get_link_net" [1] Kind regards,