aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/switchdev.h
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2016-07-14 10:32:43 +0300
committerDavid S. Miller <davem@davemloft.net>2016-07-14 13:34:29 -0700
commit8438884d4ab423161b974854ebb90c08219dd678 (patch)
tree5a250562028d02ca3611cb39fb57c2165c36ee1e /include/net/switchdev.h
parentnet/mlx5e: Adjustments in the TC offload code towards reuse for SRIOV (diff)
downloadlinux-dev-8438884d4ab423161b974854ebb90c08219dd678.tar.xz
linux-dev-8438884d4ab423161b974854ebb90c08219dd678.zip
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 'include/net/switchdev.h')
-rw-r--r--include/net/switchdev.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 985619a59323..9023e3e3be0b 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -227,6 +227,8 @@ void switchdev_port_fwd_mark_set(struct net_device *dev,
struct net_device *group_dev,
bool joining);
+bool switchdev_port_same_parent_id(struct net_device *a,
+ struct net_device *b);
#else
static inline void switchdev_deferred_process(void)
@@ -351,6 +353,12 @@ static inline void switchdev_port_fwd_mark_set(struct net_device *dev,
{
}
+static inline bool switchdev_port_same_parent_id(struct net_device *a,
+ struct net_device *b)
+{
+ return false;
+}
+
#endif
#endif /* _LINUX_SWITCHDEV_H_ */