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

Function virtio_get_speed_duplex

dpdk/drivers/net/virtio/virtio_ethdev.c:1409–1432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1407}
1408
1409static void
1410virtio_get_speed_duplex(struct rte_eth_dev *eth_dev,
1411 struct rte_eth_link *link)
1412{
1413 struct virtio_hw *hw = eth_dev->data->dev_private;
1414 struct virtio_net_config *config;
1415 struct virtio_net_config local_config;
1416
1417 config = &local_config;
1418 virtio_read_dev_config(hw,
1419 offsetof(struct virtio_net_config, speed),
1420 &config->speed, sizeof(config->speed));
1421 virtio_read_dev_config(hw,
1422 offsetof(struct virtio_net_config, duplex),
1423 &config->duplex, sizeof(config->duplex));
1424 hw->speed = config->speed;
1425 hw->duplex = config->duplex;
1426 if (link != NULL) {
1427 link->link_duplex = hw->duplex;
1428 link->link_speed = hw->speed;
1429 }
1430 PMD_INIT_LOG(DEBUG, "link speed = %d, duplex = %d",
1431 hw->speed, hw->duplex);
1432}
1433
1434static uint64_t
1435ethdev_to_virtio_rss_offloads(uint64_t ethdev_hash_types)

Callers 2

virtio_init_deviceFunction · 0.85
virtio_dev_link_updateFunction · 0.85

Calls 1

virtio_read_dev_configFunction · 0.85

Tested by

no test coverage detected