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

Function ethdev_mtu_config

dpdk/app/graph/ethdev.c:321–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321static int
322ethdev_mtu_config(const char *name, uint32_t mtu)
323{
324 struct ethdev *eth_hdl;
325 uint16_t portid = 0;
326 int rc;
327
328 rc = rte_eth_dev_get_port_by_name(name, &portid);
329 if (rc < 0)
330 return rc;
331
332 eth_hdl = ethdev_port_by_id(portid);
333
334 if (eth_hdl) {
335 rc = rte_eth_dev_set_mtu(portid, mtu);
336 if (rc < 0)
337 return rc;
338
339 eth_hdl->config.mtu = mtu;
340 return 0;
341 }
342
343 rc = -EINVAL;
344 return rc;
345}
346
347
348static int

Callers 1

cli_ethdev_mtuFunction · 0.85

Calls 3

ethdev_port_by_idFunction · 0.85
rte_eth_dev_set_mtuFunction · 0.85

Tested by

no test coverage detected