diff options
author | Yuval Mintz <Yuval.Mintz@qlogic.com> | 2016-05-11 16:36:24 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-12 07:04:08 +0300 |
commit | 73390ac9d82bf9f0c849ff57b06a03145fbf05d6 (patch) | |
tree | c72ce4f7f57fd862d4be7f5cf0ee5f6c50834ae2 /drivers/net/ethernet/qlogic/qede | |
parent | 6ddc7608258d57d61e16d55461400bb6eff18d72 (diff) | |
download | linux-73390ac9d82bf9f0c849ff57b06a03145fbf05d6.tar.xz |
qed*: support ndo_get_vf_config
Allows the user to view the VF configuration by observing the PF's
device.
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qede')
-rw-r--r-- | drivers/net/ethernet/qlogic/qede/qede_main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c index a908bd69d252..7130ee7f87da 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_main.c +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c @@ -1793,6 +1793,17 @@ static struct rtnl_link_stats64 *qede_get_stats64( } #ifdef CONFIG_QED_SRIOV +static int qede_get_vf_config(struct net_device *dev, int vfidx, + struct ifla_vf_info *ivi) +{ + struct qede_dev *edev = netdev_priv(dev); + + if (!edev->ops) + return -EINVAL; + + return edev->ops->iov->get_config(edev->cdev, vfidx, ivi); +} + static int qede_set_vf_rate(struct net_device *dev, int vfidx, int min_tx_rate, int max_tx_rate) { @@ -2153,6 +2164,7 @@ static const struct net_device_ops qede_netdev_ops = { #ifdef CONFIG_QED_SRIOV .ndo_set_vf_link_state = qede_set_vf_link_state, .ndo_set_vf_spoofchk = qede_set_vf_spoofchk, + .ndo_get_vf_config = qede_get_vf_config, .ndo_set_vf_rate = qede_set_vf_rate, #endif #ifdef CONFIG_QEDE_VXLAN |