Merge branch 'L3_master_device'
authorDavid S. Miller <davem@davemloft.net>
Wed, 30 Sep 2015 03:41:10 +0000 (20:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Sep 2015 03:41:10 +0000 (20:41 -0700)
commitf82ff596c7a8917b21100117646c719017ce8fe4
treec5106779c21e734397a7bedf8ddf7f9002d478cd
parente6934f3ec00b04234acb24a1a2c28af59763d3b5
parent9478d12d33ad12d29c5343ae7346b51bc1f4c5a9
Merge branch 'L3_master_device'

David Ahern says:

====================
net: L3 master device

The VRF device is essentially a Layer 3 master device used to associate
netdevices with a specific routing table and to influence FIB lookups
via 'ip rules' and controlling the oif/iif used for the lookup.

This series generalizes the VRF into L3 master device, l3mdev. Similar
to switchdev it has a Kconfig option and separate set of operations
in net_device allowing it to be completely compiled out if not wanted.
The l3mdev methods rely on the 'master' aspect and use of
netdev_master_upper_dev_get_rcu to retrieve the master device from a
given netdevice if it is enslaved to an L3_MASTER.

The VRF device is converted to use the l3mdev operations. At the end the
vrf_ptr is no longer and removed, as are all direct references to VRF.
The end result is a much simpler implementation for VRF.

Thanks to Nikolay for suggestions (eg., use of the master linkage which
is the key to making this work) and to Roopa, Andy and Shrijeet for
early reviews.

v3
- added license header to l3mdev.c

- export symbols in l3mdev.c for use with GPL modules

- removed netdevice header from l3mdev.h (not needed) and fixed
  typo in comment

v2
- rebased to top of net-next
- addressed Niks comments (checking master, removing extra lines, and
  flipping the order of patches 1 and 2)
====================

Signed-off-by: David S. Miller <davem@davemloft.net>