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

Function i40e_support_multi_driver

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

Source from the content-addressed store, hash-verified

1278}
1279
1280static int
1281i40e_support_multi_driver(struct rte_eth_dev *dev)
1282{
1283 struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
1284 struct rte_kvargs *kvlist;
1285 int kvargs_count;
1286
1287 /* Enable global configuration by default */
1288 pf->support_multi_driver = false;
1289
1290 if (!dev->device->devargs)
1291 return 0;
1292
1293 kvlist = rte_kvargs_parse(dev->device->devargs->args, valid_keys);
1294 if (!kvlist)
1295 return -EINVAL;
1296
1297 kvargs_count = rte_kvargs_count(kvlist, ETH_I40E_SUPPORT_MULTI_DRIVER);
1298 if (!kvargs_count) {
1299 rte_kvargs_free(kvlist);
1300 return 0;
1301 }
1302
1303 if (kvargs_count > 1)
1304 PMD_DRV_LOG(WARNING, "More than one argument \"%s\" and only "
1305 "the first invalid or last valid one is used !",
1306 ETH_I40E_SUPPORT_MULTI_DRIVER);
1307
1308 if (rte_kvargs_process(kvlist, ETH_I40E_SUPPORT_MULTI_DRIVER,
1309 i40e_parse_multi_drv_handler, pf) < 0) {
1310 rte_kvargs_free(kvlist);
1311 return -EINVAL;
1312 }
1313
1314 rte_kvargs_free(kvlist);
1315 return 0;
1316}
1317
1318static int
1319i40e_aq_debug_write_global_register(struct i40e_hw *hw,

Callers 1

eth_i40e_dev_initFunction · 0.85

Calls 4

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

Tested by

no test coverage detected