Changeset View
Changeset View
Standalone View
Standalone View
contrib/ofed/libmlx5/mlx5.c
Show First 20 Lines • Show All 357 Lines • ▼ Show 20 Lines | else | ||||
fprintf(stderr, PFX "Warning: failed to get my cpu set\n"); | fprintf(stderr, PFX "Warning: failed to get my cpu set\n"); | ||||
goto out; | goto out; | ||||
} | } | ||||
/* get device local cpu set */ | /* get device local cpu set */ | ||||
mlx5_local_cpu_set(ibdev, &dev_local_cpus); | mlx5_local_cpu_set(ibdev, &dev_local_cpus); | ||||
/* check if my cpu set is in dev cpu */ | /* check if my cpu set is in dev cpu */ | ||||
#if __FreeBSD_version < 1400046 | |||||
se: This is an example of a change applied to contributed code that needs to support both forms of… | |||||
CPU_OR(&result_set, &my_cpus); | CPU_OR(&result_set, &my_cpus); | ||||
CPU_OR(&result_set, &dev_local_cpus); | CPU_OR(&result_set, &dev_local_cpus); | ||||
#else | |||||
CPU_OR(&result_set, &my_cpus, &dev_local_cpus); | |||||
#endif | |||||
stall_enable = CPU_EQUAL(&result_set, &dev_local_cpus) ? 0 : 1; | stall_enable = CPU_EQUAL(&result_set, &dev_local_cpus) ? 0 : 1; | ||||
out: | out: | ||||
return stall_enable; | return stall_enable; | ||||
} | } | ||||
static void mlx5_read_env(struct ibv_device *ibdev, struct mlx5_context *ctx) | static void mlx5_read_env(struct ibv_device *ibdev, struct mlx5_context *ctx) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 654 Lines • Show Last 20 Lines |
This is an example of a change applied to contributed code that needs to support both forms of CPU_OR() - at least if the change is to be applied to the up-stream sources.