1
0
Fork 0
alistair23-linux/drivers/net
Brett Creeley e0ef26fbe2 iavf: fix speed reporting over virtchnl
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>
2020-06-11 14:53:50 -07:00
..
appletalk docs: networking: convert ltpc.txt to ReST 2020-04-30 12:56:36 -07:00
arcnet docs: networking: convert arcnet.txt to ReST 2020-04-28 14:38:38 -07:00
bonding net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
caif docs: networking: convert caif files to ReST 2020-04-28 14:38:38 -07:00
can net: Fix return value about devm_platform_ioremap_resource() 2020-05-23 16:28:25 -07:00
dsa net: dsa: lantiq_gswip: fix and improve the unsupported interface error 2020-06-07 17:09:46 -07:00
ethernet iavf: fix speed reporting over virtchnl 2020-06-11 14:53:50 -07:00
fddi docs: networking: convert skfp.txt to ReST 2020-04-30 12:56:38 -07:00
fjes
hamradio net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
hippi
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
ieee802154
ipa drivers: ipa: remove discription of nonexistent element 2020-05-27 14:58:28 -07:00
ipvlan net: partially revert dynamic lockdep key changes 2020-05-04 12:05:56 -07:00
netdevsim netdevsim: Register control traps 2020-06-01 11:49:23 -07:00
phy net: dp83869: Reset return variable if PHY strap is read 2020-06-06 15:53:44 -07:00
plip docs: networking: convert PLIP.txt to ReST 2020-04-30 12:56:37 -07:00
ppp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-15 13:48:59 -07:00
slip
team net: partially revert dynamic lockdep key changes 2020-05-04 12:05:56 -07:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-31 17:48:46 -07:00
vmxnet3 vmxnet3: allow rx flow hash ops only when rss is enabled 2020-06-02 15:12:33 -07:00
wan docs: networking: convert framerelay.txt to ReST 2020-04-28 14:39:46 -07:00
wimax
wireguard wireguard: noise: separate receive counter from send counter 2020-05-20 20:55:09 -07:00
wireless net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
xen-netback
Kconfig docs: networking: device drivers: convert sb1000.txt to ReST 2020-05-01 12:24:42 -07:00
LICENSE.SRC
Makefile
Space.c
bareudp.c net: bareudp: avoid uninitialized variable warning 2020-05-07 17:28:18 -07:00
dummy.c
eql.c
geneve.c geneve: change from tx_error to tx_dropped on missing metadata 2020-06-04 15:45:15 -07:00
gtp.c gtp: set NLM_F_MULTI flag in gtp_genl_dump_pdp() 2020-05-01 15:34:09 -07:00
ifb.c
loopback.c
macsec.c net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
macvlan.c net: change addr_list_lock back to static key 2020-06-09 12:59:45 -07:00
macvtap.c
mdio.c
mii.c
net_failover.c net_failover: fixed rollback in net_failover_open() 2020-06-02 15:35:53 -07:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c rionet: Fix use correct return type for ndo_start_xmit() 2020-04-30 12:15:13 -07:00
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c xdp: Rename convert_to_xdp_frame in xdp_convert_buff_to_frame 2020-06-01 15:02:53 -07:00
veth.c xdp: Rename convert_to_xdp_frame in xdp_convert_buff_to_frame 2020-06-01 15:02:53 -07:00
virtio_net.c xdp: Rename convert_to_xdp_frame in xdp_convert_buff_to_frame 2020-06-01 15:02:53 -07:00
vrf.c net: partially revert dynamic lockdep key changes 2020-05-04 12:05:56 -07:00
vsockmon.c
vxlan.c vxlan: Remove access to nexthop group struct 2020-06-10 13:20:20 -07:00
xen-netfront.c