On Mon, Mar 12, 2018 at 02:43:18PM +0100, Nelio Laranjeiro wrote: > This behavior is mixed between what should be handled by the application > and what is under PMD responsibility. > > According to DPDK API: > - link_update() should only query the link status [1] > - link_set_{up,down}() should only set the link to the according status [1] > - dev_{start,stop}() should enable/disable traffic reception/emission [2]
The description of rte_eth_dev_set_link_up() is [1] : The device rx/tx functionality will be disabled if success, and it can be re-enabled with a call to rte_eth_dev_set_link_up() This means, if user runs "set link-down port 0" on testpmd, traffic should stop by disabling Rx/Tx on device. But unfortunately, mlx5 doesn't have a way to stop device but it rather relies on kernel implementation - e.g. SIOCSIFFLAGS. So, even if the command is run, traffic goes on. I guess the original implementation might be needed to workaround this situation. Shall we talk to HW and driver people regarding how to access dev (or PHY) from user-level? [1] http://dpdk.org/doc/api/rte__ethdev_8h.html#a51d7a0d2bb4202f9ebf9f174ba1f6e5c Thanks, Yongseok