| 249 | } |
| 250 | |
| 251 | int |
| 252 | link_is_up(const char *name) |
| 253 | { |
| 254 | struct rte_eth_link link_params; |
| 255 | struct link *link; |
| 256 | |
| 257 | /* Check input params */ |
| 258 | if (name == NULL) |
| 259 | return 0; |
| 260 | |
| 261 | link = link_find(name); |
| 262 | if (link == NULL) |
| 263 | return 0; |
| 264 | |
| 265 | /* Resource */ |
| 266 | if (rte_eth_link_get(link->port_id, &link_params) < 0) |
| 267 | return 0; |
| 268 | |
| 269 | return (link_params.link_status == RTE_ETH_LINK_DOWN) ? 0 : 1; |
| 270 | } |
nothing calls this directly
no test coverage detected