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

Function link_speed_handler

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

Source from the content-addressed store, hash-verified

2049#define VIRTIO_ARG_VECTORIZED "vectorized"
2050
2051static int
2052link_speed_handler(const char *key __rte_unused,
2053 const char *value, void *ret_val)
2054{
2055 uint32_t val;
2056 if (!value || !ret_val)
2057 return -EINVAL;
2058 val = strtoul(value, NULL, 0);
2059 /* validate input */
2060 if (virtio_dev_speed_capa_get(val) == 0)
2061 return -EINVAL;
2062 *(uint32_t *)ret_val = val;
2063
2064 return 0;
2065}
2066
2067
2068static int

Callers

nothing calls this directly

Calls 2

strtoulFunction · 0.85

Tested by

no test coverage detected