]> asedeno.scripts.mit.edu Git - linux.git/commit
net: core: dev_addr_lists: add auxiliary func to handle reference address updates
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Thu, 8 Nov 2018 20:27:54 +0000 (22:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Nov 2018 04:30:57 +0000 (20:30 -0800)
commite7946760de5852f32c4e52ce47f37e85346981b9
tree0d128b48eaede2259167293cf23c622e04b5e837
parent29e12207174a58ac8cab4914d0a7ce5e6c872646
net: core: dev_addr_lists: add auxiliary func to handle reference address updates

In order to avoid all table update, and only remove or add new
address, the auxiliary function exists, named __hw_addr_sync_dev().
It allows end driver do nothing when nothing changed and add/rm when
concrete address is firstly added or lastly removed. But it doesn't
include cases when an address of real device or vlan was reused by
other vlans or vlan/macval devices.

For handaling events when address was reused/unreused the patch adds
new auxiliary routine - __hw_addr_ref_sync_dev(). It allows to do
nothing when nothing was changed and do updates only for an address
being added/reused/deleted/unreused. Thus, clone address changes for
vlans can be mirrored in the table. The function is exclusive with
__hw_addr_sync_dev(). It's responsibility of the end driver to
identify address vlan device, if it needs so.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev_addr_lists.c