aboutsummaryrefslogtreecommitdiffstats
path: root/net/switchdev
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2016-07-14 03:32:43 -0400
committerDavid S. Miller <davem@davemloft.net>2016-07-14 16:34:29 -0400
commit8438884d4ab423161b974854ebb90c08219dd678 (patch)
tree5a250562028d02ca3611cb39fb57c2165c36ee1e /net/switchdev
parent5c40348c69f33c4c14c051181088e8c71e38be7d (diff)
net/switchdev: Export the same parent ID service function
This helper serves to know if two switchdev port netdevices belong to the same HW ASIC, e.g to figure out if forwarding offload is possible between them. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev')
-rw-r--r--net/switchdev/switchdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 59658b2e9cdf..a5fc9dd24aa9 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -1286,8 +1286,8 @@ void switchdev_fib_ipv4_abort(struct fib_info *fi)
1286} 1286}
1287EXPORT_SYMBOL_GPL(switchdev_fib_ipv4_abort); 1287EXPORT_SYMBOL_GPL(switchdev_fib_ipv4_abort);
1288 1288
1289static bool switchdev_port_same_parent_id(struct net_device *a, 1289bool switchdev_port_same_parent_id(struct net_device *a,
1290 struct net_device *b) 1290 struct net_device *b)
1291{ 1291{
1292 struct switchdev_attr a_attr = { 1292 struct switchdev_attr a_attr = {
1293 .orig_dev = a, 1293 .orig_dev = a,
@@ -1323,6 +1323,7 @@ static u32 switchdev_port_fwd_mark_get(struct net_device *dev,
1323 1323
1324 return dev->ifindex; 1324 return dev->ifindex;
1325} 1325}
1326EXPORT_SYMBOL_GPL(switchdev_port_same_parent_id);
1326 1327
1327static void switchdev_port_fwd_mark_reset(struct net_device *group_dev, 1328static void switchdev_port_fwd_mark_reset(struct net_device *group_dev,
1328 u32 old_mark, u32 *reset_mark) 1329 u32 old_mark, u32 *reset_mark)