diff options
author | Vishwanathapura, Niranjana <niranjana.vishwanathapura@intel.com> | 2017-04-12 20:29:27 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-04-20 12:01:38 -0400 |
commit | 1bd671ab3fb99932fc8692463eabbb237b6bcef1 (patch) | |
tree | 7acbf22109526b541bb883a72d89054928a8d101 /drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c | |
parent | IB/opa-vnic: VNIC Ethernet Management Agent (VEMA) interface (diff) | |
download | linux-dev-1bd671ab3fb99932fc8692463eabbb237b6bcef1.tar.xz linux-dev-1bd671ab3fb99932fc8692463eabbb237b6bcef1.zip |
IB/opa-vnic: VNIC Ethernet Management Agent (VEMA) function
OPA VEMA function interfaces with the Infiniband MAD stack to exchange the
management information packets with the Ethernet Manager (EM).
It interfaces with the OPA VNIC netdev function to SET/GET the management
information. The information exchanged with the EM includes class port
details, encapsulation configuration, various counters, unicast and
multicast MAC list and the MAC table. It also supports sending traps
to the EM.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sadanand Warrier <sadanand.warrier@intel.com>
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c')
-rw-r--r-- | drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c b/drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c index a98948c4fe09..d66540e24885 100644 --- a/drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c +++ b/drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c @@ -120,6 +120,17 @@ static struct vnic_stats vnic_gstrings_stats[] = { #define VNIC_STATS_LEN ARRAY_SIZE(vnic_gstrings_stats) +/* vnic_get_drvinfo - get driver info */ +static void vnic_get_drvinfo(struct net_device *netdev, + struct ethtool_drvinfo *drvinfo) +{ + strlcpy(drvinfo->driver, opa_vnic_driver_name, sizeof(drvinfo->driver)); + strlcpy(drvinfo->version, opa_vnic_driver_version, + sizeof(drvinfo->version)); + strlcpy(drvinfo->bus_info, dev_name(netdev->dev.parent), + sizeof(drvinfo->bus_info)); +} + /* vnic_get_sset_count - get string set count */ static int vnic_get_sset_count(struct net_device *netdev, int sset) { @@ -162,6 +173,7 @@ static void vnic_get_strings(struct net_device *netdev, u32 stringset, u8 *data) /* ethtool ops */ static const struct ethtool_ops opa_vnic_ethtool_ops = { + .get_drvinfo = vnic_get_drvinfo, .get_link = ethtool_op_get_link, .get_strings = vnic_get_strings, .get_sset_count = vnic_get_sset_count, |