diff options
author | Sridhar Samudrala <sri@us.ibm.com> | 2010-10-28 09:10:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-22 11:24:29 -0500 |
commit | eb06acdc85585f28864261f28659157848762ee4 (patch) | |
tree | 8db786f687bfb8b969d00bb2695454938ea41f1d /include/linux | |
parent | e5700c740da2cb9f5a3aa978cd1fa3a79916ba04 (diff) |
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')
-rw-r--r-- | include/linux/if_link.h | 1 |
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 { | |||
259 | MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */ | 259 | MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */ |
260 | MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ | 260 | MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ |
261 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ | 261 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ |
262 | MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */ | ||
262 | }; | 263 | }; |
263 | 264 | ||
264 | /* SR-IOV virtual function management section */ | 265 | /* SR-IOV virtual function management section */ |