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

Function validate_action_name

dpdk/lib/eal/common/eal_common_proc.c:180–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180static int
181validate_action_name(const char *name)
182{
183 if (name == NULL) {
184 RTE_LOG(ERR, EAL, "Action name cannot be NULL\n");
185 rte_errno = EINVAL;
186 return -1;
187 }
188 if (strnlen(name, RTE_MP_MAX_NAME_LEN) == 0) {
189 RTE_LOG(ERR, EAL, "Length of action name is zero\n");
190 rte_errno = EINVAL;
191 return -1;
192 }
193 if (strnlen(name, RTE_MP_MAX_NAME_LEN) == RTE_MP_MAX_NAME_LEN) {
194 rte_errno = E2BIG;
195 return -1;
196 }
197 return 0;
198}
199
200int
201rte_mp_action_register(const char *name, rte_mp_t action)

Callers 3

rte_mp_action_registerFunction · 0.85
rte_mp_action_unregisterFunction · 0.85
check_inputFunction · 0.85

Calls 1

strnlenFunction · 0.85

Tested by

no test coverage detected