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

Function ixgbe_dev_link_status_print

dpdk/drivers/net/ixgbe/ixgbe_ethdev.c:4629–4652  ·  view source on GitHub ↗

* It gets and then prints the link status. * * @param dev * Pointer to struct rte_eth_dev. * * @return * - On success, zero. * - On failure, a negative value. */

Source from the content-addressed store, hash-verified

4627 * - On failure, a negative value.
4628 */
4629static void
4630ixgbe_dev_link_status_print(struct rte_eth_dev *dev)
4631{
4632 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
4633 struct rte_eth_link link;
4634
4635 rte_eth_linkstatus_get(dev, &link);
4636
4637 if (link.link_status) {
4638 PMD_INIT_LOG(INFO, "Port %d: Link Up - speed %u Mbps - %s",
4639 (int)(dev->data->port_id),
4640 (unsigned)link.link_speed,
4641 link.link_duplex == RTE_ETH_LINK_FULL_DUPLEX ?
4642 "full-duplex" : "half-duplex");
4643 } else {
4644 PMD_INIT_LOG(INFO, " Port %d: Link Down",
4645 (int)(dev->data->port_id));
4646 }
4647 PMD_INIT_LOG(DEBUG, "PCI Address: " PCI_PRI_FMT,
4648 pci_dev->addr.domain,
4649 pci_dev->addr.bus,
4650 pci_dev->addr.devid,
4651 pci_dev->addr.function);
4652}
4653
4654/*
4655 * It executes link_update after knowing an interrupt occurred.

Calls 1

rte_eth_linkstatus_getFunction · 0.85

Tested by

no test coverage detected