1
0
Fork 0
alistair23-linux/drivers/net/ethernet/intel/iavf
Brett Creeley 93b6757365 iavf: fix speed reporting over virtchnl
[ Upstream commit e0ef26fbe2 ]

Link speeds are communicated over virtchnl using an enum
virtchnl_link_speed. Currently, the highest link speed is 40Gbps which
leaves us unable to reflect some speeds that an ice VF is capable of.
This causes link speed to be misreported on the iavf driver.

Allow for communicating link speeds using Mbps so that the proper speed can
be reported for an ice VF. Moving away from the enum allows us to
communicate future speed changes without requiring a new enum to be added.

In order to support communicating link speeds over virtchnl in Mbps the
following functionality was added:
    - Added u32 link_speed_mbps in the iavf_adapter structure.
    - Added the macro ADV_LINK_SUPPORT(_a) to determine if the VF
      driver supports communicating link speeds in Mbps.
    - Added the function iavf_get_vpe_link_status() to fill the
      correct link_status in the event_data union based on the
      ADV_LINK_SUPPORT(_a) macro.
    - Added the function iavf_set_adapter_link_speed_from_vpe()
      to determine whether or not to fill the u32 link_speed_mbps or
      enum virtchnl_link_speed link_speed field in the iavf_adapter
      structure based on the ADV_LINK_SUPPORT(_a) macro.
    - Do not free vf_res in iavf_init_get_resources() as vf_res will be
      accessed in iavf_get_link_ksettings(); memset to 0 instead. This
      memory is subsequently freed in iavf_remove().

Fixes: 7c710869d6 ("ice: Add handlers for VF netdevice operations")
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Sergey Nemov <sergey.nemov@intel.com>
Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-24 17:50:44 +02:00
..
Makefile iavf: Rename i40e_adminq* files to iavf_adminq* 2019-05-31 00:15:53 -07:00
iavf.h iavf: fix speed reporting over virtchnl 2020-06-24 17:50:44 +02:00
iavf_adminq.c iavf: change remaining i40e defines to be iavf 2019-05-31 01:03:17 -07:00
iavf_adminq.h iavf: change remaining i40e defines to be iavf 2019-05-31 01:03:17 -07:00
iavf_adminq_cmd.h iavf: replace i40e variables with iavf 2019-05-31 01:02:53 -07:00
iavf_alloc.h iavf: change iavf_status_code to iavf_status 2019-05-31 00:19:33 -07:00
iavf_client.c iavf: update comments and file checks to match iavf 2019-05-31 01:03:24 -07:00
iavf_client.h iavf: rename iavf_client.h defines to match driver name 2019-05-31 01:03:13 -07:00
iavf_common.c iavf: update comments and file checks to match iavf 2019-05-31 01:03:24 -07:00
iavf_devids.h
iavf_ethtool.c iavf: fix speed reporting over virtchnl 2020-06-24 17:50:44 +02:00
iavf_main.c iavf: fix speed reporting over virtchnl 2020-06-24 17:50:44 +02:00
iavf_osdep.h iavf: Fix up debug print macro 2019-06-28 15:59:56 -07:00
iavf_prototype.h iavf: replace i40e variables with iavf 2019-05-31 01:02:53 -07:00
iavf_register.h
iavf_status.h iavf: rename iavf_status structure flags 2019-05-31 01:03:04 -07:00
iavf_trace.h iavf: update comments and file checks to match iavf 2019-05-31 01:03:24 -07:00
iavf_txrx.c net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
iavf_txrx.h net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
iavf_type.h iavf: change remaining i40e defines to be iavf 2019-05-31 01:03:17 -07:00
iavf_virtchnl.c iavf: fix speed reporting over virtchnl 2020-06-24 17:50:44 +02:00