| 1374 | } |
| 1375 | |
| 1376 | static int |
| 1377 | i40e_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 | |
| 1408 | free_end: |
| 1409 | rte_kvargs_free(kvlist); |
| 1410 | return ret; |
| 1411 | } |
| 1412 | |
| 1413 | #define I40E_ALARM_INTERVAL 50000 /* us */ |
| 1414 |
no test coverage detected