ethdev: format link status text
authorIvan Dyukov <i.dyukov@samsung.com>
Tue, 15 Sep 2020 19:06:57 +0000 (22:06 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 21 Sep 2020 16:05:37 +0000 (18:05 +0200)
commitfbf931c9c392b0c1d4dec77f75353e86f5725055
treedcaf72f05c31a71397c7bbd4a7e7f478704f9a7f
parentfb053c35c66ee0052fcb715f137c49305f83a6db
ethdev: format link status text

There is new link_speed value introduced. It's INT_MAX value which
means that speed is unknown. To simplify processing of the value
in application, new function is added which convert link_speed to
string. Also dpdk examples have many duplicated code which format
entire link status structure to text.

This commit adds two functions:
  * rte_eth_link_speed_to_str - format link_speed to string
  * rte_eth_link_to_str - convert link status structure to string

Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
MAINTAINERS
app/test/meson.build
app/test/test_ethdev_link.c [new file with mode: 0644]
lib/librte_ethdev/rte_ethdev.c
lib/librte_ethdev/rte_ethdev.h
lib/librte_ethdev/rte_ethdev_version.map