| 292 | } |
| 293 | |
| 294 | void |
| 295 | mlx5_malloc_mem_select(uint32_t sys_mem_en) |
| 296 | { |
| 297 | /* |
| 298 | * The initialization should be called only once and all devices |
| 299 | * should use the same memory type. Otherwise, when new device is |
| 300 | * being attached with some different memory allocation configuration, |
| 301 | * the memory will get wrong behavior or a failure will be raised. |
| 302 | */ |
| 303 | if (!mlx5_sys_mem.init) { |
| 304 | if (sys_mem_en) |
| 305 | mlx5_sys_mem.enable = 1; |
| 306 | mlx5_sys_mem.init = 1; |
| 307 | DRV_LOG(INFO, "%s is selected.", sys_mem_en ? "SYS_MEM" : "RTE_MEM"); |
| 308 | } else if (mlx5_sys_mem.enable != sys_mem_en) { |
| 309 | DRV_LOG(WARNING, "%s is already selected.", |
| 310 | mlx5_sys_mem.enable ? "SYS_MEM" : "RTE_MEM"); |
| 311 | } |
| 312 | } |
no outgoing calls
no test coverage detected