mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 02:46:49 +07:00
79aab093a0
Introduce new rtnl UAPI that exposes a list of vlans per VF, giving the ability for user-space application to specify it for the VF, as an option to support 802.1ad. We adjusted IP Link tool to support this option. For future use cases, the new UAPI supports multiple vlans. For now we limit the list size to a single vlan in kernel. Add IFLA_VF_VLAN_LIST in addition to IFLA_VF_VLAN to keep backward compatibility with older versions of IP Link tool. Add a vlan protocol parameter to the ndo_set_vf_vlan callback. We kept 802.1Q as the drivers' default vlan protocol. Suitable ip link tool command examples: Set vf vlan protocol 802.1ad: ip link set eth0 vf 1 vlan 100 proto 802.1ad Set vf to VST (802.1Q) mode: ip link set eth0 vf 1 vlan 100 proto 802.1Q Or by omitting the new parameter ip link set eth0 vf 1 vlan 100 Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
31 lines
515 B
C
31 lines
515 B
C
#ifndef _LINUX_IF_LINK_H
|
|
#define _LINUX_IF_LINK_H
|
|
|
|
#include <uapi/linux/if_link.h>
|
|
|
|
|
|
/* We don't want this structure exposed to user space */
|
|
struct ifla_vf_stats {
|
|
__u64 rx_packets;
|
|
__u64 tx_packets;
|
|
__u64 rx_bytes;
|
|
__u64 tx_bytes;
|
|
__u64 broadcast;
|
|
__u64 multicast;
|
|
};
|
|
|
|
struct ifla_vf_info {
|
|
__u32 vf;
|
|
__u8 mac[32];
|
|
__u32 vlan;
|
|
__u32 qos;
|
|
__u32 spoofchk;
|
|
__u32 linkstate;
|
|
__u32 min_tx_rate;
|
|
__u32 max_tx_rate;
|
|
__u32 rss_query_en;
|
|
__u32 trusted;
|
|
__be16 vlan_proto;
|
|
};
|
|
#endif /* _LINUX_IF_LINK_H */
|