summaryrefslogtreecommitdiff
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-03-24 02:30:33 +0100
committerDavid S. Miller <davem@davemloft.net>2021-03-24 12:48:38 -0700
commite4417d6950b06fe6c520e937b337daff093220ff (patch)
tree48433016596aea9bb123982ee15bb6232c995f51 /include/linux/netdevice.h
parentddb94eafab8b597b05904c8277194ea2d6357fa9 (diff)
downloadlwn-e4417d6950b06fe6c520e937b337daff093220ff.tar.gz
lwn-e4417d6950b06fe6c520e937b337daff093220ff.zip
net: 8021q: resolve forwarding path for vlan devices
Add .ndo_fill_forward_path for vlan devices. For instance, assuming the following topology: IP forwarding / \ eth0.100 eth0 | eth0 . . . ethX ab:cd:ef:ab:cd:ef For packets going through IP forwarding to eth0.100 whose destination MAC address is ab:cd:ef:ab:cd:ef, dev_fill_forward_path() provides the following path: eth0.100 -> eth0 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 03cff88c7292..8823a56744f1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -850,11 +850,18 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
enum net_device_path_type {
DEV_PATH_ETHERNET = 0,
+ DEV_PATH_VLAN,
};
struct net_device_path {
enum net_device_path_type type;
const struct net_device *dev;
+ union {
+ struct {
+ u16 id;
+ __be16 proto;
+ } encap;
+ };
};
#define NET_DEVICE_PATH_STACK_MAX 5