i40e: Add support for ethtool -s <interface> speed <speed in Mb>
Add ability to change speed through ethtool -s <interface> speed <speed in Mb> Driver advertises all link modes that support requested speed. Autoneg must be set off e.g.: ethtool -s <interface> autoneg off speed <speed in Mb>. Add helper function that translate speed in Mb to enum i40e_aq_link_speed and compare it to supported speeds from given ethtool_link_ksettings. Add in i40e_set_link_ksettings hold for requested speed and set copy_ks.base.speed to safe_ks.base.speed to be sure that user is not changing unsupported setting. In i40e_speed_to_link_speed compare requested speed with supported speeds. Set speed to requested speed. Signed-off-by: NNorbert Zulinski <norbertx.zulinski@intel.com> Signed-off-by: NMateusz Palczewski <mateusz.palczewski@intel.com> Tested-by: NDave Switzer <david.switzer@intel.com> Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
Showing
想要评论请 注册 或 登录