From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yongseok Koh Subject: Re: [PATCH v2 2/3] net/mlx5: fix link status behavior Date: Tue, 13 Mar 2018 14:54:44 -0700 Message-ID: <20180313215443.GB26229@yongseok-MBP.local> References: <21fb91002768a627d9c7f3d81e0c8a12fbf6811f.1518684427.git.nelio.laranjeiro@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, Adrien Mazarguil , shahafs@mellanox.com, stable@dpdk.org To: Nelio Laranjeiro Return-path: Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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