forked from Minki/linux
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>
25 lines
920 B
C
25 lines
920 B
C
/* Broadcom NetXtreme-C/E network driver.
|
|
*
|
|
* Copyright (c) 2014-2016 Broadcom Corporation
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef BNXT_SRIOV_H
|
|
#define BNXT_SRIOV_H
|
|
|
|
int bnxt_get_vf_config(struct net_device *, int, struct ifla_vf_info *);
|
|
int bnxt_set_vf_mac(struct net_device *, int, u8 *);
|
|
int bnxt_set_vf_vlan(struct net_device *, int, u16, u8, __be16);
|
|
int bnxt_set_vf_bw(struct net_device *, int, int, int);
|
|
int bnxt_set_vf_link_state(struct net_device *, int, int);
|
|
int bnxt_set_vf_spoofchk(struct net_device *, int, bool);
|
|
int bnxt_sriov_configure(struct pci_dev *pdev, int num_vfs);
|
|
void bnxt_sriov_disable(struct bnxt *);
|
|
void bnxt_hwrm_exec_fwd_req(struct bnxt *);
|
|
void bnxt_update_vf_mac(struct bnxt *);
|
|
int bnxt_approve_mac(struct bnxt *, u8 *);
|
|
#endif
|