summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2018-04-03 17:16:25 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-04-25 08:26:19 -0700
commit6cb1937d4eff6936089139169377fda208a2701a (patch)
tree0e41f8b5999158cd8633c12b78d7be9ecab1b785 /include
parenta222311283641c9a476426ccacb2a3c82bfe5aaa (diff)
downloadlinux-stable-6cb1937d4eff6936089139169377fda208a2701a.tar.gz
linux-stable-6cb1937d4eff6936089139169377fda208a2701a.tar.bz2
linux-stable-6cb1937d4eff6936089139169377fda208a2701a.zip
macvlan: Add function to test for destination filtering support
This patch adds a function indicating if a given macvlan can fully supports destination filtering, especially as it relates to unicast traffic. For those macvlan interfaces that do not support destination filtering such passthru or source mode filtering we should not be enabling offload support. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/if_macvlan.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h
index 80089d6c5a0a..0221390668a0 100644
--- a/include/linux/if_macvlan.h
+++ b/include/linux/if_macvlan.h
@@ -88,4 +88,13 @@ static inline void *macvlan_accel_priv(struct net_device *dev)
return macvlan->accel_priv;
}
+
+static inline bool macvlan_supports_dest_filter(struct net_device *dev)
+{
+ struct macvlan_dev *macvlan = netdev_priv(dev);
+
+ return macvlan->mode == MACVLAN_MODE_PRIVATE ||
+ macvlan->mode == MACVLAN_MODE_VEPA ||
+ macvlan->mode == MACVLAN_MODE_BRIDGE;
+}
#endif /* _LINUX_IF_MACVLAN_H */