]> git.proxmox.com Git - mirror_iproute2.git/commit
ip link: Add support to configure SR-IOV VF to vlan protocol 802.1ad (VST QinQ)
authorMoshe Shemesh <moshe@mellanox.com>
Wed, 28 Sep 2016 07:58:59 +0000 (10:58 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 10 Oct 2016 02:17:15 +0000 (19:17 -0700)
commit56e9f0ab19e3226f799610fdb28a619d45ca0c99
treeb914dfd43a0671cf9ff7b02d629104a164ed4565
parent39f8caeb96ee123fcacd9281139da076d6117b16
ip link: Add support to configure SR-IOV VF to vlan protocol 802.1ad (VST QinQ)

Introduce a new API that exposes a list of vlans per VF (IFLA_VF_VLAN_LIST),
giving the ability for user-space application to specify it for the VF as
an option to support 802.1ad (VST QinQ).

We introduce struct vf_vlan_info, which extends struct vf_vlan and adds
an optional VF VLAN proto parameter.
Default VLAN-protocol is 802.1Q.

Add IFLA_VF_VLAN_LIST in addition to IFLA_VF_VLAN to keep backward
compatibility with older kernel versions.

Suitable ip link tool command examples:
 - Set vf vlan protocol 802.1ad (S-TAG)
ip link set eth0 vf 1 vlan 100 proto 802.1ad
 - Set vf vlan S-TAG and vlan C-TAG (VST QinQ)
ip link set eth0 vf 1 vlan 100 proto 802.1ad vlan 30 proto 802.1Q
 - Set vf to VST (802.1Q) mode
ip link set eth0 vf 1 vlan 100 proto 802.1Q
 - Or by omitting the new parameter (backward compatible)
ip link set eth0 vf 1 vlan 100

Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
ip/ipaddress.c
ip/iplink.c
man/man8/ip-link.8.in