[dpdk-users] Setting fixed link speed on i40e

Hankyu Kim hankyu.kim at vastech.co.za
Thu Aug 1 09:44:29 CEST 2019


I've noticed not being able to set link speed is a known issue that's been around for a while:
https://doc.dpdk.org/guides-19.05/rel_notes/known_issues.html#cannot-set-link-speed-on-intel-40g-ethernet-controller
http://mails.dpdk.org/archives/users/2018-March/002982.html

However, when I remove the following check in i40e_ethdev.c:
        // if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
        //            PMD_INIT_LOG(ERR,
        //            "Invalid link_speeds for port %u, autonegotiation disabled",
        //                                  dev->data->port_id);
        //            return -EINVAL;
        // }

and force i40e_phy_conf_link to run by setting the link down after configuring link_speeds in the application:
        port_conf.link_speeds =  ETH_LINK_SPEED_1G | ETH_LINK_SPEED_FIXED;
        rte_eth_dev_set_link_down(port);
        ...
        rte_eth_dev_start(port);

The link appears to have changed from the default value of 10Gb to 1Gb, for Intel XXV710 NIC.
Is this a correct way to change the link speed? Or is there a problem I'm missing, that caused this to be blocked?

Regards,
Hankyu Kim


More information about the users mailing list