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

Function i40e_parse_vf_msg_config

dpdk/drivers/net/i40e/i40e_ethdev.c:1376–1411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1374}
1375
1376static int
1377i40e_parse_vf_msg_config(struct rte_eth_dev *dev,
1378 struct i40e_vf_msg_cfg *msg_cfg)
1379{
1380 struct rte_kvargs *kvlist;
1381 int kvargs_count;
1382 int ret = 0;
1383
1384 memset(msg_cfg, 0, sizeof(*msg_cfg));
1385
1386 if (!dev->device->devargs)
1387 return ret;
1388
1389 kvlist = rte_kvargs_parse(dev->device->devargs->args, valid_keys);
1390 if (!kvlist)
1391 return -EINVAL;
1392
1393 kvargs_count = rte_kvargs_count(kvlist, ETH_I40E_VF_MSG_CFG);
1394 if (!kvargs_count)
1395 goto free_end;
1396
1397 if (kvargs_count > 1) {
1398 PMD_DRV_LOG(ERR, "More than one argument \"%s\"!",
1399 ETH_I40E_VF_MSG_CFG);
1400 ret = -EINVAL;
1401 goto free_end;
1402 }
1403
1404 if (rte_kvargs_process(kvlist, ETH_I40E_VF_MSG_CFG,
1405 read_vf_msg_config, msg_cfg) < 0)
1406 ret = -EINVAL;
1407
1408free_end:
1409 rte_kvargs_free(kvlist);
1410 return ret;
1411}
1412
1413#define I40E_ALARM_INTERVAL 50000 /* us */
1414

Callers 1

eth_i40e_dev_initFunction · 0.85

Calls 5

memsetFunction · 0.85
rte_kvargs_parseFunction · 0.85
rte_kvargs_countFunction · 0.85
rte_kvargs_processFunction · 0.85
rte_kvargs_freeFunction · 0.85

Tested by

no test coverage detected