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

Function rte_eth_dev_get_mtu

dpdk/lib/ethdev/rte_ethdev.c:4048–4067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4046}
4047
4048int
4049rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu)
4050{
4051 struct rte_eth_dev *dev;
4052
4053 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
4054 dev = &rte_eth_devices[port_id];
4055
4056 if (mtu == NULL) {
4057 RTE_ETHDEV_LOG(ERR, "Cannot get ethdev port %u MTU to NULL\n",
4058 port_id);
4059 return -EINVAL;
4060 }
4061
4062 *mtu = dev->data->mtu;
4063
4064 rte_ethdev_trace_get_mtu(port_id, *mtu);
4065
4066 return 0;
4067}
4068
4069int
4070rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)

Callers 7

port_infos_displayFunction · 0.85
show_portFunction · 0.85
ethdev_showFunction · 0.85
print_link_infoFunction · 0.85
ethdev_showFunction · 0.85

Calls

no outgoing calls

Tested by 2