summaryrefslogtreecommitdiff
path: root/include/linux/if_link.h
diff options
context:
space:
mode:
authorSridhar Samudrala <sri@us.ibm.com>2010-10-28 13:10:50 +0000
committerDavid S. Miller <davem@davemloft.net>2010-11-22 08:24:29 -0800
commiteb06acdc85585f28864261f28659157848762ee4 (patch)
tree8db786f687bfb8b969d00bb2695454938ea41f1d /include/linux/if_link.h
parente5700c740da2cb9f5a3aa978cd1fa3a79916ba04 (diff)
downloadlwn-eb06acdc85585f28864261f28659157848762ee4.tar.gz
lwn-eb06acdc85585f28864261f28659157848762ee4.zip
macvlan: Introduce 'passthru' mode to takeover the underlying device
With the current default 'vepa' mode, a KVM guest using virtio with macvtap backend has the following limitations. - cannot change/add a mac address on the guest virtio-net - cannot create a vlan device on the guest virtio-net - cannot enable promiscuous mode on guest virtio-net To address these limitations, this patch introduces a new mode called 'passthru' when creating a macvlan device which allows takeover of the underlying device and passing it to a guest using virtio with macvtap backend. Only one macvlan device is allowed in passthru mode and it inherits the mac address from the underlying device and sets it in promiscuous mode to receive and forward all the packets. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> ------------------------------------------------------------------------- Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_link.h')
-rw-r--r--include/linux/if_link.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 2e02e4d7b11e..6485d2a89bec 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -259,6 +259,7 @@ enum macvlan_mode {
MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */
MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */
MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */
+ MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */
};
/* SR-IOV virtual function management section */