diff options
author | Sainath Grandhi <sainath.grandhi@intel.com> | 2017-02-10 19:03:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-11 20:59:41 -0500 |
commit | 6fe3faf86757eb7f078ff06b23b206f17dc4fb36 (patch) | |
tree | 4602f5f435ad34f406ec980694daae4faf5d6119 /drivers/net/macvlan.c | |
parent | ebc05ba7e8600b52a2a0c87a43105143368aca2a (diff) |
tap: Abstract type of virtual interface from tap implementation
macvlan object is re-structured to hold tap related elements in a separate
entity, tap_dev. Upon NETDEV_REGISTER device_event, tap_dev is registered with
idr and fetched again on tap_open. Few of the tap functions are modified to
accepted tap_dev as argument. tap_dev object includes callbacks to be used by
underlying virtual interface to take care of tx and rx accounting.
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r-- | drivers/net/macvlan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index cbfc1be23a0e..9261722960a7 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -1525,7 +1525,6 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = { | |||
1525 | int macvlan_link_register(struct rtnl_link_ops *ops) | 1525 | int macvlan_link_register(struct rtnl_link_ops *ops) |
1526 | { | 1526 | { |
1527 | /* common fields */ | 1527 | /* common fields */ |
1528 | ops->priv_size = sizeof(struct macvlan_dev); | ||
1529 | ops->validate = macvlan_validate; | 1528 | ops->validate = macvlan_validate; |
1530 | ops->maxtype = IFLA_MACVLAN_MAX; | 1529 | ops->maxtype = IFLA_MACVLAN_MAX; |
1531 | ops->policy = macvlan_policy; | 1530 | ops->policy = macvlan_policy; |
@@ -1548,6 +1547,7 @@ static struct rtnl_link_ops macvlan_link_ops = { | |||
1548 | .newlink = macvlan_newlink, | 1547 | .newlink = macvlan_newlink, |
1549 | .dellink = macvlan_dellink, | 1548 | .dellink = macvlan_dellink, |
1550 | .get_link_net = macvlan_get_link_net, | 1549 | .get_link_net = macvlan_get_link_net, |
1550 | .priv_size = sizeof(struct macvlan_dev), | ||
1551 | }; | 1551 | }; |
1552 | 1552 | ||
1553 | static int macvlan_device_event(struct notifier_block *unused, | 1553 | static int macvlan_device_event(struct notifier_block *unused, |