MCPcopy Create free account
hub / github.com/F-Stack/f-stack / link_is_up

Function link_is_up

dpdk/examples/ip_pipeline/link.c:251–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251int
252link_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}

Callers

nothing calls this directly

Calls 2

link_findFunction · 0.85
rte_eth_link_getFunction · 0.85

Tested by

no test coverage detected