| 1278 | } |
| 1279 | |
| 1280 | static int |
| 1281 | i40e_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 | |
| 1318 | static int |
| 1319 | i40e_aq_debug_write_global_register(struct i40e_hw *hw, |
no test coverage detected